next up previous
Next: Changing the working directory, Up: Other UNIX commands Previous: Other UNIX commands

Listing files, directories - ls, lc

The list ls command in UNIX is an equivalent to the dir command in Dos. ls shows all subdirectories and files in the current directory. By default it does not distinguish between files and directories. ls -l displays the list of all files in the current directory including their size, permissions etc. Directories differ from files by character 'd' in the first position on the line. '-' denotes a regular file.

Another handy command is lc because it lists directories and files separately. Type
lc
and check carefully the result. Notice the files you did not see with ls. They start with '.' and have a special meaning, such as setup files. The setup file .cshrc used when you log in is the most important one. You will hear about it later today and in the next lab.



Instructional Support Group 2008-08-05