Linux Quick Tip

The du (disk usage) command is a Unix/Linux command that estimates file space usage.

The command:

du -hsc *

lists the file and directory sizes of the current working directory.

  • h = show sizes in human readable format (1K, 1M, 1G, …)
  • s = summarize the totals for each argument
  • c = display a grand total

For example running du -hsc * in my current directory lists all the sam files, their sizes, and the total size of the directory.


I’m running a HISAT2 alignment, so when I checked a few minutes later, I can see the sam files are bigger and closer to being done.


This is also an easy way to check if a file is empty or how file sizes compare to each other.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s