Du file type




















Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Getting size with du of files only Ask Question. Asked 10 years, 3 months ago. Active 2 years, 11 months ago.

Viewed 68k times. How can I get the size of all files and all files in its subdirectories using the du command. I am trying the following command to get the size of all files and files in subdirectories find. The operating system is AIX 6. Improve this question.

Rui F Ribeiro Shardul Upadhyay Shardul Upadhyay 1 1 gold badge 6 6 silver badges 5 5 bronze badges. Add a comment. Improve this question.

Piokaz Piokaz 1 1 gold badge 3 3 silver badges 6 6 bronze badges. I recommend using awk to compute the end sum using du without -h — Alex. Alex, why would that be preferred? Add a comment. Active Oldest Votes. Use xargs 1 instead of -exec : find. Improve this answer. Carl Norum Carl Norum k 30 30 gold badges silver badges bronze badges. This doesn't work for me on Ubuntu To speed things up you could add the max depth if you know the structure of directories you're looking for: find.

Try du -hcs. From the manpage: -s, --summarize display only a total for each argument. However, also supports various compression file formats.

As far as we know, this. This is usually the case of system, configuration, temporary, or data files containing data exclusive to only one software and used for its own purposes. Also some proprietary or closed file formats cannot be converted to more common file types in order to protect the intellectual property of the developer, which is for example the case of some DRM-protected multimedia files.

Previous file extension DUR file extension. While searching for files using disk space to potentially be removed it can be beneficial to view the last modified time stamp. For example if used disk space is increasing over time then the most recently modified files are a good place to investigate, for instance we may have a large log file that is constantly being modified and written to. Rather than showing the size of all files and directories, we can set a threshold to only show results larger than a specified number.

This may be helpful if we want to search for files larger than a specified size which would be useful in finding large single files that may be using the majority of your disk space. With the --exclude option we can optionally not show anything that matches a specified pattern in the search results. In this example we can see that we have a.

By default du displays block usage, however we can instead change this to show the inode usage with the —inodes option. By default the output of the du command shows one result per line, which helps a lot when we go to read the output, however if you are perhaps creating a script to collect the data and perform a task on the output it may be easier to do so with a string of data without the newline character.

This is where the -0 option comes in, it replaces the new line characters with a null byte and outputs everything on a single line. By default the du command will search recursively either from where specified or otherwise from within the current working directory.

This is where the -x option comes in, it will ignore all other file systems that it may find.



0コメント

  • 1000 / 1000