Ls Command in Linux
In Linux ,ls command is used to list the file and directory’s information.
To view all options of ls command
$ ls –help
Options | Description |
---|---|
ls -a | list all files including hidden file starting with ‘.’ |
ls –color | colored list [=always/never/auto] |
ls -i | list file’s inode index number |
ls -l | list with long format – show permissions |
ls -la | list long format including hidden files |
ls -lh | list long format with readable file size |
ls -ls | list with long format with file size |
ls -r | list in reverse order |
ls -S | sort by file size |
ls -t | sort by time & date |