-
Copying File and Directory
Copying File and Directory:
- Copy file:
Syntax:
# cp [source]filename [destination]
- Copy directory
#cp –r [source]directory [destination]
to copy a directory into another directory recursively
- cp –rf [source]directory [destination]
to copy a directory forcefully
syntax used for copy file or directory:
cp [option] file destination
option:
-I : interactive : ask before overwriting file
-r : Recursive
-p : Preserve
-f : forcefully
More than one file can be copied at a time if the destination is directory
Syntax:
cp [option] file1 file2 file 3 Destination
- Copy file:
Subscribe to:
Post Comments (Atom)
.
0 comments: