|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I am trying to use the find command to search for files and remove
them prior to the date specified. I need to hard code the date in the find such as dd/mm/yy not in that format. I don't want to put -atime +100 to eliminate files prior to 100 days. can it be done using find or any other means |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Tue, 17 Jul 2007 08:12:58 -0700, rogv24@yahoo.com
<rogv24@yahoo.com> wrote: > > > I am trying to use the find command to search for files and remove > them prior to the date specified. > > I need to hard code the date in the find such as dd/mm/yy not in that > format. > > I don't want to put -atime +100 to eliminate files prior to 100 days. > > can it be done using find or any other means > You can touch a file with that date and use find ! -newer filename. -- Some changes are so slow, you don't notice them. Others are so fast, they don't notice you. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Jul 17, 10:04 am, Bill Marcum <marcumb...@bellsouth.net> wrote:
> On Tue, 17 Jul 2007 08:12:58 -0700, rog...@yahoo.com <rog...@yahoo.com> wrote: > > > I am trying to use the find command to search for files and remove > > them prior to the date specified. > > > I need to hard code the date in the find such as dd/mm/yy not in that > > format. > > > I don't want to put -atime +100 to eliminate files prior to 100 days. > > > can it be done using find or any other means > > You can touch a file with that date and use find ! -newer filename. > > -- > Some changes are so slow, you don't notice them. Others are so fast, > they don't notice you. Yes the file touch trick works well. Me? I am lazy, One way I have "listed" out files for later action is to use find -ls and egrep Some examples, To list only files of July 12 13 14, find -ls|egrep "Jul[ ][1][234]" To make a list of file names that I might use later, find -ls|egrep "Jul[ ][1][234]"|tr -s ' '|cut -d ' ' -f12 I have used the the egrep trick to drop out files of a sepc date, or a date range, like weekend only files, etc. For your issue, you would have to set up a list for the egrep. That part I leave to u. 2 cents... JB |
|
![]() |
| Outils de la discussion | |
|
|