Examples of using the cp command

To copy a file from another user's home directory:

   cp ~helper/file1 file2

This copies file1 from the home directory of user helper to file2 in your current working directory.


To copy a file from a subdirectory in the user's home directory:

   cp ~helper/book/part2/file1 file2

This copies file1 from the subdirectory book/part2/ in the home directory of user helper to file2 in your current working directory.


[Home] [Search] [Index] This site maintained by unixhelp@mathcs.duq.edu