![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find files with specific time | Shahul | Shell Programming and Scripting | 4 | 08-20-2008 10:51 AM |
| How to find a specific files in a many directory | selamba_warrior | Shell Programming and Scripting | 7 | 05-28-2008 03:41 PM |
| Shell script to find out 2 last modified files in a folder..PLZ HELP!!!!!!!!! | anju | Shell Programming and Scripting | 3 | 02-01-2008 01:47 AM |
| find files modified in a specific month | omer_ome | UNIX for Advanced & Expert Users | 1 | 07-02-2006 09:43 AM |
| reading files for specific dates | siva_jm | Shell Programming and Scripting | 3 | 06-08-2004 04:19 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
To find files with specific dates and cp another folder.
Hi all,
We have an existing script: find /u03/oraprod/perpcomn/admin/out -type f -ctime +7 \ -exec cp {} "/u08/oraprod/backup/cout" \; Which is to find all files more than 7 days and copy to another folder. However I would like to only list files with Sep 29, and cp to another folder. How can I modify to do so? Thx in advance. |
|
||||
|
Please note that the full iso standard file listing is required to successfully execute the following.
Full ISO listing can be accessed via the "ls" command-line option per the following: U**X: -E Linux: --full Please substitute one of the above in the code below under the variable $ISOLISTING $SOURCEDIR and $DESTDIR should be obvious. A little messy, but it works. Code:
(cd $SOURCEDIR ; tar -cf - `find . -type f -exec ls $ISOLISTING {} \; | grep 2008-09-29 | awk ' { print $9 }'` ) | (cd $DESTDIR ; tar -xpvBf -)
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|