How to speed up du?

How to speed up du?

If you only need to know the size of the directory, you can speed it up a lot by simply avoiding writing the information to the screen. Since the grand total is the last line of the du command, you can simply pipe it to tail .

What is the purpose of du command?

Summarize disk space used for each FILE and/or directory. Disk space is printed in units of 1024 bytes
du/Function

What is NCDU command?

Ncdu is a command line tool to view and analyse disk space usage on linux. It can drill down into directories and report space used by individual directories. This way it is very easy to track down space consuming files/directories. It actually allows the user to do this much faster than even a gui file manager.

What is the difference between DF and du in Linux?

du is used to estimate file space usage—space used under a particular directory or files on a file system. df is used to display the amount of available disk space for file systems on which the invoking user has appropriate read access. The result of the command du doesn’t include the size of the deleting file.

Is there a way to speed up du summaries?

Common usage of du can be immensely sped up by using ncdu. performs the du, caches the results and shows them in a nice command line gui, somewhat comparable to du -hc -d 1 | sort -h.

What happens when you rerun a du command?

What you are seeing when you rerun a du command is the effect of disk buffering. Once you read a block its disk buffer is kept in the buffer cache until that block is needed. For du you need to read the directory and the inode for each file in the directory.

How is Duc built to scale to huge filesystems?

Duc is built to scale to huge filesystems: it will index and display hundreds of millions of files on petabytes of storage without problems. Agedu is a piece of software which attempts to find old and irregularly used files on the presumption that these files are most likely not to be wanted. (e.g. Downloads which have only been viewed once.)