Overclock.net banner

1 - 11 of 11 Posts

·
Premium Member
Joined
·
10,351 Posts
Discussion Starter #1
What are the basic commands in terminal for:

-Copying a file
-Pasting a file
-Deleting a file
-Moving a file

If you could provide an example for each, that would be most appreciated! Thanks
 

·
Premium Member
Joined
·
5,573 Posts
You talking about a linux shell? Or Microsoft Terminal services?
 

·
Premium Member
Joined
·
5,573 Posts
Quote:

Originally Posted by Torched-Geek
I can imagine linux shell... o_O

In Terminal Services for M$ there are weird key combos to do all that. I was cornfused.
 

·
Premium Member
Joined
·
5,047 Posts
Quote:

Originally Posted by The Hundred Gunner
What are the basic commands in terminal for:

-Copying a file
-Pasting a file
-Deleting a file
-Moving a file

If you could provide an example for each, that would be most appreciated! Thanks

ill take care of copy for you .. the command is cp lets say you want to copy a file from /home/user to /media/usbdisk and the file name is TEST1.sh you would type in

Code:

Code:
cp  /home/user/TEST1.sh /media/usbdisk
and it will copy the file for you you can also copy directorys say you want to copy /home/user/music to /media/usbdisk you want to get all the files so you will add the flag -r for recursive like this

Code:

Code:
cp -r /home/user/music /media/usbdisk
someone else can tell ya the other 3
 

·
Premium Member
Joined
·
3,590 Posts
copy= "cp"
You can type "man cp" in the terminal to find all of the available. options/flags.(press q to exit man pages) Link
move="mv"
works just like copy. link
delete/remove="rm"
"man rm" for for info. Link
basic use "rm /home/user/screenshot.jpg"
or to remove a folder and everything in it "rm -R /home/user/notes"
paste="paste"
"man paste" for more info. Link
 

·
Premium Member
Joined
·
10,351 Posts
Discussion Starter #7
Quote:


Originally Posted by FrankenPC

You talking about a linux shell? Or Microsoft Terminal services?

Oops, i guess i should have said Linux. Reason is because i'm folding on this rig and i put everything on my desktop. "Work" is a locked folder and i can't move it, so i need to go into terminal as root and move it with that.
 

·
Premium Member
Joined
·
2,402 Posts
Quote:


Originally Posted by dangerousHobo

copy= "cp"
You can type "man cp" in the terminal to find all of the available. options/flags.(press q to exit man pages) Link
move="mv"
works just like copy.
link
delete/remove="rm"
"man rm" for for info. Link
basic use "rm /home/user/screenshot.jpg"
or to remove a folder and everything in it "rm -R /home/user/notes"
paste="paste"
"man paste" for more info. Link

Not quite...

mv MOVES the file. So: 'mv essay.odt ./school/' will move the file essay.odt into the folder school. After this command, there will be only ONE copy of the file, and it will be in the folder school.

When deleting directories on the command line, you'll find it doesn't like to delete directories when they're not empty. I recommend using Nautilus/Konqueror to mess with that stuff...

So cp is the copy-paste
mv is the cut-paste
rm is the delete.

That explain it?

EDIT: BTW it's 'cp FROM TO' and 'mv FROM TO'.
 

·
Premium Member
Joined
·
3,590 Posts
Quote:


Originally Posted by ouroboros1827

Not quite...

mv MOVES the file. So: 'mv essay.odt ./school/' will move the file essay.odt into the folder school. After this command, there will be only ONE copy of the file, and it will be in the folder school.

When deleting directories on the command line, you'll find it doesn't like to delete directories when they're not empty. I recommend using Nautilus/Konqueror to mess with that stuff...

So cp is the copy-paste
mv is the cut-paste
rm is the delete.

That explain it?

Sorry I meant the syntax in the terminal is the same as copy and not the action.
 
1 - 11 of 11 Posts
Top