![]() |
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 |
| urgent help needed!!in copying files to /tmp at boot time,pls help! | wrapster | UNIX for Advanced & Expert Users | 0 | 04-27-2008 10:00 AM |
| pERL SCRIPT FOR MONITORING DATE/TIME STAMPS FOR START AND STOP OF APPLICAION IN A LOG | FREDDIE091970 | Shell Programming and Scripting | 4 | 03-31-2008 09:59 PM |
| List files with date and time stamps only | davewg | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 06:33 AM |
| Copying files created after a specified date/time | jm6601 | Shell Programming and Scripting | 2 | 11-28-2007 01:29 PM |
| Copying multiple directories at the same time using Unix | JPigford | UNIX for Dummies Questions & Answers | 9 | 01-17-2005 05:16 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Copying Files in the same order along with time stamps
Hi ,
I am New to this group and would like to know if someone can help me on this issue : We need to copy some files from a particular directory to another directory in the same order and time stamps .How can this be achieved . For Ex : ./ABC/disk101/XYZ has 1000 files with varying time stamps .Now we have a toch files for all these 1000 files is another directory under XYZ Now I would like to remove say 100 files and place them in another directory but the order of the files should not change as the files are processed under the same order and the it is like FIFO . How can this be acheived ... Someone Please Help . |
|
||||
|
Care: There are three time stamps on each file.
Hi Shyam!
As blowtorch says: 1) to remove and place in another directory: use "mv" 2) to copy and preseve the creation time: use cp -p <from> <to> But you need to understand the different time stamps that a file has, to experiment with these, and decide with time stamp that you want/need to use. Here are some ideas: A file has three time stamps associated with it, from "man find": Code:
-mtime : File’s data was last modified -atime : File was last accessed -ctime : File’s status was last changed Using "ls", you (apparently) are only able to access TWO time stamps (from "man ls"): Code:
-c with -lt: sort by, and show, ctime (time of last modification of file status information) with -l: show ctime and sort by name otherwise: sort by ctime -u with -lt: sort by, and show, access time with -l: show access time and sort by name otherwise: sort by access time --full-time like -l --time-style=full-iso Hope this has been useful. Regards GrahamB |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|