[SOLVED] How to copy a file between directories from Terminal Command Line

Status
Not open for further replies.

GodCorleone

Honorable
Apr 12, 2014
33
0
10,530
Hi guys,
I have been learning CLI basics and i am on a stumbling block already. How do I copy a file from my desktop to a temp folder I created?
Temp folder location:
Macintosh HD> Users> GodCorleone
the file ("ex12.txt") location:
Macintosh HD> Users> GodCorleone> Desktop

Thanks.
 
Solution
Sorry! I misread your post. Assuming the temp folder is called "Temp", type:

cp Desktop/ex12.txt Temp

For full details of the cp command type:

man cp

which will display the man page for that command. Almost all commands have a man page describing their use in detail.


It says: cp: ex12.txt: No such file or directory

There is that file in my desktop though!
 
Sorry! I misread your post. Assuming the temp folder is called "Temp", type:

cp Desktop/ex12.txt Temp

For full details of the cp command type:

man cp

which will display the man page for that command. Almost all commands have a man page describing their use in detail.
 
Solution
Status
Not open for further replies.