| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ls - List Directory Contents (Page 1 of 3) The first command we will examine is the ls command. This command asks the shell to list the contents of the current directory and is analogous to the dir command in DOS. Typing: ls and pressing enter will produce a simple list of the files and directories within the current working directory. The ls command is very straightforward and comes with several options two of which are most frequently used. The general form is: ls [options] [path to file or directory] First the -a option, will add hidden files to the listing. If you remember, filenames that start with a . are referred to as hidden files. These files are not displayed by the ls command unless the -a option is used. The form of the command is: ls -a [pathname] A list of all the files in the directory will be shown, including all filenames that began with a dot. Two filenames of interest will appear in this list are: . .. These two files appear in every directory, the . file is a name that points to the current directory. The .. file points to the parent directory. The ways that these two names can be used will be discussed with cd command.
Home - Table Of Contents - Contact Us CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com Version 1.0 - Version Date: March 29, 2005 Adapted with permission from a work created by Tcat Houser et al. CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||