The “ls” command

Display the contents of a directory.

This command is used to display the contents of a directory, where the “<PATH>” variable should be populated with the complete path to the desired directory.

ls <OPTION>... <PATH>...


ls --list -S /123456/test /123456/new

Available options

The “<OPTION>” variable displayed in the above example can be populated with any of the following options:

Option Description
-l, --list Include additional file information (e.g., permissions and ownership).
-Q, --quote-name Place entry names in double quotes.
-r, --reverse Sort in reverse order.
-S Use file size to sort the list.
-t Use modification time to sort the list.
-U Leave the list unsorted and display the contents in directory order.
-X Use entry extension to sort alphabetically.
-h, --help Display help information for this command.