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
mv - Move (rename) Files
Previous Page
Pages in Current Topic/Section
1
Next Page
rmdir - Remove Empty Directories
Next Topic/Section

rm - Remove Files Or Directories

Again rm has an equivalent, the command del (delete) in Windows or DOS. As described rm can delete files or directories and their contents.

The notation is:

rm [options] filename

When the command is used with no options, the file will be unquestionably deleted. The -I option causes rm to execute in the interactive mode giving a prompt to confirm that the delete should occur. If filename is actually the name of a directory the delete will not occur unless the -r (recursive) option is used.

One must be particularly careful using this command with Meta characters or at least be sure to use the -i option, so that if the match of file names is different than one expects, the command can be terminated or at least told not to delete the files. Notice that:

rm *

is particularly dangerous since this will delete every file in the current working directory except for hidden files. If one has administrative or super user privileges forms of this command can be devastating.

rm /*

run as root would delete everything from all mounted file systems.


Previous Topic/Section
mv - Move (rename) Files
Previous Page
Pages in Current Topic/Section
1
Next Page
rmdir - Remove Empty Directories
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.