#1. By Using du command
You can usedu command
with in the following ways.- du -a /home | sort -n -r | head -n 5
- du -hs * | sort -rh | head -5
- du -Sh | sort -rh | head -5
#2. By Using find command
find command can also be used to list highest disk consuming files and directories.- find -type f -exec du -Sh {} + | sort -rh | head -n 5
find -type f -size +50M
find -type f -size +50M -exec ls -alh {} \; | sort -nk 5
#3. By Using ls command
You can executels command
with the argumenst as mentioned below.ls -alhS
ls -lhtr
Check out the blog to read in-detailed procedure for all the commands.