View Single Post
  #5  
Old October 7th, 2001, 04:45 PM
AdmiralAK's Avatar
AdmiralAK AdmiralAK is offline
Simply Daemonic
 
Join Date: Oct 2000
Location: Classified
Posts: 5,787
Thanks: 0
Thanked 0 Times in 0 Posts
AdmiralAK is on a distinguished road
How do I rename something ? How do I copy ?

Ahhh renaming.
For that we use the mv command ("move" command).
It is done like this:
mv old_name new_name

The old_name is the file you have, the new_name is the name you want to give it.

lets take a look at an example:

Code:
[admiralty:~/pictures] admiral% mkdir jow
[admiralty:~/pictures] admiral% ls
jow
[admiralty:~/pictures] admiral% mv jow joe
[admiralty:~/pictures] admiral% ls
joe
[admiralty:~/pictures] admiral%
Explanation:
I made a directory called "jow" ... of course I made a typo!
To correct this is a simple matter with the MV command.
I just do mv jow (the file I made) joe (the new name I want to give it).
To make sure I did what I wanted it to do, I did an LS command, and I see that it worked!


---
How do you copy something ?

Simple! Use the command called cp (for CoPy).
The syntax of this command is similar to the MV command

cp source destination
where source is the source file, and destination is the destination file.

Lets say I want to duplicate my "AK" text file so that I have "AK" and "AK1":

Code:
[admiralty:~/pictures] admiral% ls
AK  joe
[admiralty:~/pictures] admiral% cp AK AK1
[admiralty:~/pictures] admiral% ls
AK  AK1 joe
[admiralty:~/pictures] admiral%
Explanation:
I did an LS to see what I had, and I DID have the AK file,
did the CP command as cp AK AK1 , where AK was my original file and AK1 is my duplicate "cloned" file.
Then I did an LS to double check and actually see that I did what I wanted to do



And that ladies and gents is how you copy and rename
__________________
<<------------------------------>>
Seid ihr bereit fuer Club Admiralty ????
Club Admiralty: Http://www.club-admiralty.com
Copyright 1996-present
Bonified Gadget Geek :-)
<<------------------------------>>
Reply With Quote