Linux logoToday while I was upgrading my ArchLinux I noticed that my root partition was running out of space. Since I didn't want to clear the whole pacman cache I had to quickly find which packages in pacman's cache directory are using the most space in order to delete them. Here is a quick command to list a directory contents, sort them by size in reverse order and display their size in human readable format (e.g. KB, MB, GB etc.).

ls -lShr

l: list contents
S: sort by size
h: human readable
r: reverse order while sorting

A quick Linux command tip for the Linux users!

Comments (0)

Subscribe to this comment's feed

Write comment

smaller | bigger
security image
Write the displayed characters



Login Form

Follow me on...

  • Facebook
  • Twitter
  • Google+: u/0/b/113039112812192417058/
  • Digg
  • Reddit: myguides
  • RSS Feed
  • e-mail

Member Login