How to check the top six big files in Linux

Top six big files in Linux eating out your space


# du -hsx * | sort -rh | head -6
$ du -hsx * | sort -rh | head -6

12G     ebportal-08092015.dmp
12G     ebportal-06092015.dmp
11G     oracle11204Patch
8.8G    old_temptables.dmp
7.1G    fullexp_Tue.dmp
6.0G    ebportal-07092015.dmp

Explanation of commands and switches.
  1. du – Estimate file space usages
  2. -hsx – (-h) Human Readable Format, (-s) Summaries Output, (-x) One File Format, skip directories on other file format.
  3. sort – Sort text file lines
  4. -rh – (-r) Reverse the result of comparison, (-h) for compare human readable format.
  5. head – output first n lines of file.

Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post