![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Create a list of files that were modified after a given date. | rkka | UNIX for Dummies Questions & Answers | 4 | 01-22-2008 05:12 AM |
| find files with specific date and time | itik | AIX | 3 | 01-18-2008 01:21 PM |
| List files with date and time stamps only | davewg | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 06:33 AM |
| Order files by create date | mab_arif16 | Shell Programming and Scripting | 4 | 05-15-2006 01:04 PM |
| Comparing files named by date/time | gillr | UNIX for Dummies Questions & Answers | 2 | 05-30-2005 07:37 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
retain create/mod date and time of files
Hi,
I have a requirement by which I need to take a snapshot of a certain directory of a certain types of files into a target directory within the same server (HP-UX 9000). The problem is that the files created in the target directory has the date and time of when the files were copied over. How do I maintain the date and time the files were modified/created in the source directory. Is there any commands/utilities that will enable this preservation. Anys suggestions/ideas are greatly appreciated. thanks. Jerardfjay |
|
||||
|
I don't know about hpux, but gnu cp has the -a option that does what you want.
Generally tar is available though, so you could do something like (cd src/dir && tar c -p .) | (cd dst/dir && tar x -p) You can search for more tar examples at http://www.pixelbeat.org/cmdline.html |
![]() |
| Bookmarks |
| Tags |
| cpio, mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|