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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Modification times

Status
Not open for further replies.

jprabaker

Technical User
May 31, 2001
185
GB
I'm trying to copy some home directories from a aix 4.2.1 machine to a aix 4.3.3-09 machine.

If I use the backup and restore commands to move the data, all the modification stamps on the top level directories change to the time of the restore.

The MAN page for the restore command says that the restore command by default keeps the original modification stamp.

If I go into one of the restored directories I find someway down the path either a file/direcory where the date/time has changed, yet all of the other files in the home directory seem ok.

I've also tried tar and cp -p with similar results.

Can anyone offer any suggestions? The commands used are as follows:

find . -print |backup -ivqf backup.file
restore -xvqf backup.file

Thanks,

John
 
try using tar.

tar will preserve file ownership and time stamps

Robert Robert G. Jordan
Unix Sys Admin
Sleepy Hollow, Illinois U.S.A.
sh.gif


FREE Unix Scripts
 
Get the same problem with tar. It restores some directories with the correct timestamp but most are set to the time of restore.
 
Yes, you are correct. Tar will preserve the achive date,
but you are looking to preserve the original file date.
I believe the cpio utility can do this.

Robert Robert G. Jordan
Unix Sys Admin
Sleepy Hollow, Illinois U.S.A.
sh.gif


FREE Unix Scripts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top