duc
duc copied to clipboard
duc ls return only file size or number of files
Hi
I would like to have an option that duc ls returns the sizes (or number of files) only, without the corresponding directory names.
Thanks for this great software! Chris
chrisdane> I would like to have an option that duc ls returns the chrisdane> sizes (or number of files) only, without the corresponding chrisdane> directory names.
So let me be sure I understand you.
If you have 10 files, 1 through 10 in the directory foo, along with the directories foo/a ... foo/z, which have a mix of files and directories on them, you want to only report on the files in the directory foo and how much space they take?
At that point, its really simpler to just do: 'ls -s -F
chrisdane> Thanks for this great software!
You're welcome, Zevv is the master though, I'm just the helper.
John
Hi John
Your command suggestion does not what I have in mind:
duc ls path/
103.3T subpath1
duc ls -b path/
113631019048960 subpath1
duc ls -wb path/
113631019048960
with e.g. option w ('without') for showing the size only.
"chrisdane" == chrisdane [email protected] writes:
chrisdane> Hi John chrisdane> Your command suggestion does not what I have in mind:
chrisdane> duc ls path/ chrisdane> 103.3T subpath1 chrisdane> duc ls -b path/ chrisdane> 113631019048960 subpath1 chrisdane> duc ls -wb path/ chrisdane> 113631019048960
chrisdane> with e.g. option w ('without') for showing the size only.
Ah... so how about:
duc ls -b path/ | awk '{print $1}'