PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > find command question
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

find command question

Réponse
 
LinkBack Outils de la discussion
Vieux 17/07/2007, 16h12   #1
rogv24@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut find command question

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

  Réponse avec citation
Vieux 17/07/2007, 18h04   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: find command question

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.
  Réponse avec citation
Vieux 18/07/2007, 22h17   #3
johngnub
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: find command question

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



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h21.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09933 seconds with 11 queries