-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duc ls return only file size or number of files #274
Comments
chrisdane
changed the title
duc ls return only file size
duc ls return only file size or number of files
Mar 4, 2021
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 <dir> | sort
-n' to get back useful data. The entire goal of duc is to make
finding where in the filesystem the space is taken up, not in a single
directory.
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:
with e.g. option |
>>>> "chrisdane" == chrisdane ***@***.***> 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}'
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: