rm-removes files from directories

 <  Day Day Up  >  

rm ” removes files from directories

 rm [f] [i] filename... rm r [f] [i] dirname...[filename...] 

rm removes the entries for one or more files from a directory if the file has write permission. If filename is a symbolic link, the link will be removed, but the file or directory to which it refers will not be deleted. A user does not need write permission on a symbolic link to remove it, provided he or she has write permissions in the directory.

Example A.46.
 1   rm file1 file2 2   rm -i * 3   rm -rf dir 

EXPLANATION

  1. Removes file1 and file2 from the directory.

  2. Removes all files in the present working directory, but asks first if it is okay.

  3. Recursively removes all files and directories below dir and ignores error messages.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net