Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why do access dates change after mv'ing a file

Status
Not open for further replies.

DarinGowan

Technical User
Jul 15, 2002
8
US
env: AIX 4.3.3
Alleged issue: Access dates change when I rename (mv) a file.

Question: Why does this happen? HP-UX does not do this. Is there an option, or fix that addresses this issue?

Problem: I want to maintain true "last update" date/time on files. I now have backup copies of files with the same date/time stamp as the newly updated file.

Does anyone else have this problem? I hope there is a fix for this...

Thank you kindly :?)

Darin Gowan
 
I never noticed that it behaves differently on HP, but you're right.

Here's what you have to do on AIX: cp -p <filename> /newpath/filename.

This preserves the timestamp and ownership. then you would have to do a rm <filename> to finish the &quot;mv&quot;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top