![]() |
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 Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search files between a date range | zcanji | Shell Programming and Scripting | 7 | 05-27-2009 12:31 PM |
| How to display files that have been modifed between a given date range | prathima | UNIX for Dummies Questions & Answers | 1 | 04-02-2008 11:24 AM |
| Script that can Copy a Range of files from Tape to Hard disk | msjazzie | Shell Programming and Scripting | 0 | 08-13-2007 03:47 PM |
| cp only files in certain date range | ee7klt | UNIX for Dummies Questions & Answers | 1 | 06-27-2005 09:35 PM |
| Moving Files within a particular date range | rooh | UNIX for Dummies Questions & Answers | 3 | 03-18-2002 10:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
When I do a ls -lt I get a list of files by date modified from newest to oldest. I would like to be able to copy some files to another directory using a date last modified range (i.e. Apr 30 - May 13) How could I do this?
Thanks, Joe |
|
||||
|
find has an option in most versions to pick files by age, or you could simply note the first and last files in the range and pipe ls -t output to a sed script to pick out that range.
|
|
||||
|
You can also tell find to find files that are newer than one file.
Code:
find . -type f -newer timestamped_file -print man find reveals all. ![]() Last edited by Yogesh Sawant; 05-16-2008 at 07:23 AM.. Reason: added code tags |
|
||||
|
hi
you can use find command with -mtime flag like find . -mtime (-n or n or +n) | xargs cp dirname -n for files modified in last n days n for files modified exactly on last nth day +n fro files modifed before last nth day Abhishek Gera |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|