LS command in Unix

Prev     Next

ls command in UNIX:

ls command in UNIX is used to lists the files and directories from the Unix directory.

Ex:

Options in ls command in Unix:

ls -l :

Long listing of files. List in long format, giving mode, number of links, owner, group, size in bytes and time of last modification for each file.

Ex:

ls -r:

To reverse the order of sort to get reverse (descending) collation or oldest first, as appropriate.

Ex:

ls -t:

To sort by time modified (latest first) before sorting alphabetically.

Ex:

In the real world, most of the time we will be using the command “ls -lrt” to list the files in the orders.

Ex:


UNIX command

  • By looking at the above examples, you can easily identify the difference between the each commands.
  • There are many number of options available in Unix for ls command. You can get to know each option using man command.

Share this website !!!
Facebook Twitter Linkedin