Red Hat NETSCAPE MANAGEMENT SYSTEM 6.0 - CUSTOMIZATION User Manual Page 280

  • Download
  • Add to my manuals
  • Print
  • Page
    / 300
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 279
268 Managing Files and Directories
If you want to move a le out of your home directory and into another directory, you would type:
mv sneakers.txt tigger
or, mv sneakers.txt /home/billy /home/billy/tigger using absolute pathnames.
17.5.3 Renaming Files
Actually, weve already covered half of renaming, because when you copy or move les, you can also
rename.
To copy the le sneakers.txt from our login directory to our tigger subdirectory, just type:
cp sneakers.txt tigger
To copy and rename that le from sneakers.txt to piglet.txt,type:
cp sneakers.txt tigger/piglet.txt
To move and rename the le, just substitute mv for cp in the above example.
If you cd to tigger and use ls,youll see the le piglet.txt.
If you just want to rename the le and keep its location, just mv in your current directory:
mv sneakers.txt piglet.txt
17.5.4 Deleting Files and Directories
We talked about creating les with the touch command and by using redirection in Chapter 16 on
page 217. And we created the directory tigger using mkdir.
But we havent discussed how to delete les and directories.
Deleting les and directories with the rm command (man rm) is a straightforward process.
Lets take our new le piglet.txt, and delete it from the tigger directory with the rm command:
rm piglet.txt
What happens if we didnt really want to get rid of it? Too late! Again, thatswherethe-i (interac-
tive) option comes in handy, because with it, we have the chance to think about whether we really
want to toss the le.
Page view 279
1 2 ... 275 276 277 278 279 280 281 282 283 284 285 ... 299 300

Comments to this Manuals

No comments