--- Marieke Thayer <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> Can any of you tell me how to preserve the date on the new copy of a 
> file when you use the cp command in bash?
> 
> Kubuntu 8.04
> 
> I tried
> 
> cp -p tmp.txt tmp2.txt
> cp -a tmp.txt tmp2.txt
> cp --preserve=timestamps tmp.txt tmp2.txt
> 
> 
> I tried cutting and pasting from the man page the --preserve= equivalent 
> of cp -p; cp --preserve=mode,ownership,timestamps
> 
> I am at wits end. Do I have something set up wrong in my system?
> 
> Marieke

Perhaps another approach would help with your application.  The tar command
seems to preserve dates with default options.  It can be piped in addition to
creating an intermediate archive file.

James

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to