du: add -d flag to specify the max depth to show files or directories

we don't allow to use it with -s (like GNU du). busybox allows it.
This commit is contained in:
Hiltjo Posthuma
2014-10-18 21:26:35 +00:00
committed by sin
parent b6b8fe9591
commit 2cf82f4c16
2 changed files with 24 additions and 8 deletions

8
du.1
View File

@@ -5,8 +5,9 @@ du \- display disk usage statistics
.B du
.RB [ \-a
.RB |
.B \-s
.RB ]
.BR \-s ]
.RB [ \-d
.IR depth ]
.RB [ \-k ]
.RB [ \-h ]
.RI [ file ...]
@@ -25,6 +26,9 @@ Display an entry for each file in the file hierarchy.
.BI \-s
Display only the grand total for the specified files.
.TP
.BI "\-d depth"
Maximum directory depth to print files and directories.
.TP
.BI \-k
By default all sizes are reported in 512-byte block counts.
The -k option causes the numbers to be reported in kilobyte counts.