Examples of using the ls command

1. To do a 'long' list of a single file in your current directory:

   ls -l file1
   -rw-r--r--  2 unixjohn     3287 Apr  8 12:10 file1

This displays the following information about the file file1 .

   -rw-r--r--	- access permissions
       2		- number of links to this file
   unixjohn	- owner
   3287		- size in bytes
   Apr  8 12:10	- date and time last modified

2. To do a long list of all the files in your current directory:

   ls -l
   -rw-------  1 erpl08       4307 Jun 17 10:00 FAQ.xdh
   drwx------  2 erpl08       1024 Jun 17 10:00 SCCS
   -rw-------  1 erpl08      15119 Jun 17 10:00 commands.xdh
   -rw-------  1 erpl08        266 Jun 17 10:00 concepts.xdh

This displays the following information about every file and directory in your current working directory.

   d	- this is a directory
   rwx------	- access permissions
   2	- number of links
   erpl08		- owner
   1024		- size in bytes
   Jun 17 10:00    - date and time last modified

Top document