next up previous contents
Next: cd and pwd Up: Unix Commands Previous: du   Contents

ls


The ls command stands for ``list.'' You can use this command to view a list of all the files in a directory.

Example:

[jdpoisso@legio data]$ ls 
architechture.c  architechture.h  image  interface.c  interface.h  main.c


A common usage is to use ``ls -la'' to list additional details, including permissions, file ownership and file size.

Example:

[jdpoisso@legio data]$ ls -la 
total 60 
drwxrwxr-x.  3 jdpoisso jdpoisso 4096 2010-07-02 11:56 . 
drwx------. 65 jdpoisso jdpoisso 4096 2010-07-02 11:56 .. 
-rw-rw-r--.  1 jdpoisso jdpoisso 1214 2010-05-27 13:39 architechture.c 
-rw-rw-r--.  1 jdpoisso jdpoisso 7895 2010-05-27 13:39 architechture.h 
drwxrwxr-x.  2 jdpoisso jdpoisso 4096 2010-05-27 14:12 image 
-rw-rw-r--.  1 jdpoisso jdpoisso 2730 2010-05-27 13:39 interface.c 
-rw-rw-r--.  1 jdpoisso jdpoisso  182 2010-05-27 13:39 interface.h 
-rw-rw-r--.  1 jdpoisso jdpoisso  420 2010-05-27 13:39 main.c



2010-08-27