Unix Filesystem Basics - File Management |
|
|
Listing Files
|
|
| Using ls |
To see the contents of a directory, you use the ls command. This brings up an alphabetized list of the files in your current working directory. A more complete list can be obtained by applying an option to the ls command. Three common options are -a, which lists all files including "invisible" files and subdirectories, -l, which displays more information about the contents, and -g, which identifies the group that the directory or file belongs to. Using all three options together yields something like the following:
permissions links owner group size date of last mod. filename drwxr-xr-x 1 jerry boyz 4096 Sep 9 13:58 ./ drwxr-xr-x 1 jerry boyz 4096 Mar 29 20:30 ../ -rw------- 1 jerry boyz 452 Sep 20 14:34 .cshrc -rwx------ 1 jerry boyz 314 Jan 2 13:47 scrl* drwx------ 1 jerry boyz 4096 Apr 3 11:33 ochs/ The first line, named ./, is the current directory. The second line, named ../, is the directory immediately above the current one. The names of directories, like ochs, always end with a / when using the -al option. A filename beginning with a decimal, like .cshrc, is an invisible file, only visible when you are using -a. |
| For more information on UNIX File Management one can look at: |
|---|
|