next up previous

1.5.8 cp

Copy one file into another location.

Examples
cp ~jics/MP2_June94/lab1/halftone.f ~/lab1/halftone.f
copies halftone.f from the lab1 subdirectory of the MP2_June94 subdirectory of the jics home directory to a file called halftone.f in the lab1 subdirectory of your own home directory.
cp ~jics/MP2_June94/lab1/* .
(Please notice the dot here!) copies everything in the lab1 subdirectory of the MP2_June94 subdirectory of the jics home directory into your current working directory. In this command, you should notice the `` ." This is VERY important!
cp trial1.f trial2.f
copies trial1.f in your current working directory to trial2.f in your current working directory.
cp trial1.f lab4
copies the file trial1.f into the subdirectory called lab4.
cp -r ~jics/CM5 /CM5+
copies the entire CM5 subdirectory of the jics home directory recursively into the CM5 subdirectory of your home directory.