Steps to list all the files in Linux

bhawanisingh

Administrator
Staff member
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.
Code:
# ls –la
  • This command will list all the files in descending order.
Code:
# ls -laS /var/log
  • You can also check the size in human readable format with –h option.
Code:
# ls -laSh /var/log
  • You can use –r for the reverse order.
Code:
# ls -laShr /var/log
  • You can also check inode information with i option.
Code:
# ls -lai /var/log
  • You can use g to list group of files and directories.
Code:
# ls -g /var/log
 
Top