|
CentOS Linux Server Guide |
Copy or duplicate file in CentOS Linux |
|||||||||||
Copy command for Linux is "cp".
Unless
otherwise specified by option, copy command will create new timestamp
when the copy was done.
NAME
|
| Command and options | Description | |
cp existingfilename newfilename
|
we are
copying A.txt to new file called B.txt. The system will create
newfile called B.txt
|
|
cp -r foldername newfolder
|
copy folder and all the files (recursively) to new folder.
|
|
cp -p , --preserve |
copy file
or folder to new location while preserving its file attribute. Take
note that we are copying from /etc/httpd/conf.d/README to our
current folder "." and we preserve the timestamp, user rights.
|
|
Copyright 2011 http://www.1a-centosserver.com All Rights Reserved All trademarks are the property of their respective owners. Contact Us | Terms of Use | Privacy Policy |