1832979 Members
3591 Online
110048 Solutions
New Discussion

Copy command

 
SOLVED
Go to solution
Coolmar
Esteemed Contributor

Copy command

Is there a way to copy files to another directory and keep the original timestamp? I know "mv" will do it but prefer to copy them.

Thanks!
4 REPLIES 4
Arunvijai_4
Honored Contributor
Solution

Re: Copy command

Hi Coolmar,

Try with # cp -p

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
IT_2007
Honored Contributor

Re: Copy command

cp -p will preserve permissions and timestamp.
Coolmar
Esteemed Contributor

Re: Copy command

Thanks...I thought (-p) only preserved the permissions.
KapilRaj
Honored Contributor

Re: Copy command

If they are huge files or a large number of files , use cpio.
Nothing is impossible