Operating System - HP-UX
1833326 Members
2675 Online
110051 Solutions
New Discussion

cpio -ivcBdm Restored directories have different date than the originals

 
Chad Brackmann_1
Occasional Contributor

cpio -ivcBdm Restored directories have different date than the originals

cpio -ivcBdm Restored directories have different date than the originals.

Is there a way to make cpio create directories that have the same modification date as the original?

If not would tar or pax offer this capability?

-- Chad
4 REPLIES 4
Thierry Poels_1
Honored Contributor

Re: cpio -ivcBdm Restored directories have different date than the originals

Hi,

I go for the easy solution : tar preserves dates etc.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Sanjay_6
Honored Contributor

Re: cpio -ivcBdm Restored directories have different date than the originals

Hi Chad,

the directories restored through cpio will have the new dates. It is not possible to retain the old dates. not with the default cpio. Maybe cpio utils avalable from opensource may help you with that.

I believe tar offres this facility.

Hope this helps.

Regds


Steven E. Protter
Exalted Contributor

Re: cpio -ivcBdm Restored directories have different date than the originals

the m command line switch which is being used is supposed to preserve modification times.

I would check the patch database for a new cpio. This functionality should work. Your other command line options may not be compatible with m but nothing sticks out obviously.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Chad Brackmann_1
Occasional Contributor

Re: cpio -ivcBdm Restored directories have different date than the originals

I will become a tar kind-of-guy.
Thanks.

-- Chad