copying a file without changing date stamp.

Hi,

I am using the below copy command, to copy the file sbn to sbn1,

cp sbn sbn1

but its changing the date stamp of file sbn1, but i dont want to change the date stamp of sbn1.

Could you please help me out in this.

Use the -p option, read the man page of cp.

Regards

but cp -p preserve the source date stamp. i want to preserve the destination file date stamp.

One way to do this is to use the stat command (if that is available your system) to get the modification time of the destination file.
With the touch command you can replace the modification time of the destination file founded with the stat command.

Regards