WARNING: This site is intended for online use only; mass-downloading of pages degrades the server and is prohibited.
If you attempt to use tools to mass-download the site, you may be blocked permanently by automated software.
If you want to read this CertiGuide offline, please use one of the links on the left to purchase a convenient PDF copy. Thank you.

Get the A+ 4 Real e-book for your own computer.
Click Here!

Custom Search






Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 5: The Linux Operating System
      9  Basic Concepts and Procedures for Creating, Viewing and Editing Files and Directories
           9  Common Commands

Previous Topic/Section
Common Commands
Previous Page
Pages in Current Topic/Section
1
23
Next Page
mkdir - Make Directories Command
Next Topic/Section

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.


Previous Topic/Section
Common Commands
Previous Page
Pages in Current Topic/Section
1
23
Next Page
mkdir - Make Directories Command
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



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.