next up previous contents
Next: Rename Up: Basic File Commands Previous: Print   Contents

Copy

To copy a file use cp e.g.:-

cp f1 f2
copies file f1 into f2. If f2 already exists it will be replaced, use the -i option to get UNIX to ask for confirmation before replacing existing files. If f2 is a directory rather than a file then f1 is copied to that directory preserving the file name f1.



P.D. Gronbech (IT Staff) 2015-10-02