next up previous contents
Next: Displaying and Creating Up: Files & Directories Previous: Creating & Deleting

Deleting files

Deleting files is as easy as removing directories. To remove a file we use the rmgif command. Say we want to delete the file 'd' in our programs directory:

$ls -F
d  e  f*
$rm d
$ls -F
e  f*
$

The file has been deleted without any conformation. As this is potentially dangerous, we can use an additional parameter to inquire whether or not to delete the file:

$ls -F
e  f*
$rm -i e
rm: remove `e'? y
$ls -F
f*
$

We will later find out how we can set up our system to always ask for confirmation when deleting files without having to type rm -i every time we delete a file.



Mark O. Stitson
Wed Sep 25 10:45:32 BST 1996