If you are a Linux administrator beginner then you have to manage all the directories and files and also you have to sort files according to size. For that you can follow below steps:
- First of all you can list all the files with below command and it will list hidden files too.
# ls –la
- This command will list all the files in descending order.
# ls -laS /var/log
- You can also check the size in human readable format with –h option.
# ls -laSh /var/log
- You can use –r for the reverse order.
# ls -laShr /var/log
- You can also check inode information with i option.
# ls -lai /var/log
- You can use g to list group of files and directories.
# ls -g /var/log