ls – Unix and Linux command with examples

Published On: July 23rd, 2013|Last Updated: January 7th, 2023|Categories: UNIX & Linux|Total Views: 1934|Daily Views: 1|
OptionDescription
-aDisplay all the files and folders even if they are hidden. (How to hide files and folders in unix)
-ASimilar to ‘–a’ option. Displays all the files and folders(even hidden) excluding working directory (.) and parent directory (..).
-lDisplays more information about the files like permissions, owner name, last modified time and user name.
-tDisplay files sorted in latest modification time.
-rReverse the sorted list.
-RRecursively reverse the sub directories.
-dDisplays list of directories excluding files.
-gDisplays same output of command “ls –l” excluding the owner names of the files.
-oDisplays same output of command “ls-l” excluding the group names of the files.
-iDisplays (inode) index number of each file.
-sDisplay list of files with size. This command used with “-l” option like “ls –ls”
-SDisplay files sorted by size.
-vDisplays files sorted by version.
-1Display each file in a new line.

Leave A Comment