Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Help - For the UNIX command Gods
@ 1997-02-10  5:00 Jeff Shervey
  1997-02-10  5:00 ` Marek Pola
  1997-02-11  5:00 ` Juergen Schroeder
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Shervey @ 1997-02-10  5:00 UTC (permalink / raw)



I'm trying to do something rather trivial...and the man pages don't show
any real good examples.
I just want the ability to delete files that are 10 days or older...
I know it's something with a "find . ???? | rm    or an exec command at the
end.

I've been stuck in the VMS world too long...
All help would be appreciated!!

Jeff Shervey - Oracle/Ingres DBA / Part time UNIX guy

-- 
These comments do not necessarily reflect the views of Landis & Staefa, Inc.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help - For the UNIX command Gods
  1997-02-10  5:00 Help - For the UNIX command Gods Jeff Shervey
@ 1997-02-10  5:00 ` Marek Pola
  1997-02-11  5:00 ` Juergen Schroeder
  1 sibling, 0 replies; 5+ messages in thread
From: Marek Pola @ 1997-02-10  5:00 UTC (permalink / raw)



Jeff Shervey wrote:
> 
> I'm trying to do something rather trivial...and the man pages don't show
> any real good examples.
> I just want the ability to delete files that are 10 days or older...
> I know it's something with a "find . ???? | rm    or an exec command at the
> end.

Yes, you were almost there: 

  find /some_partition -atime +10 -exec rm {} \;

will do it.

Regards

Marek



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help - For the UNIX command Gods
  1997-02-10  5:00 Help - For the UNIX command Gods Jeff Shervey
  1997-02-10  5:00 ` Marek Pola
@ 1997-02-11  5:00 ` Juergen Schroeder
  1997-02-13  5:00   ` Matt Foster
  1997-02-14  5:00   ` Alex Nord
  1 sibling, 2 replies; 5+ messages in thread
From: Juergen Schroeder @ 1997-02-11  5:00 UTC (permalink / raw)



Jeff Shervey (jeff.shervey@us.landisstaefa.com) wrote:
: I'm trying to do something rather trivial...and the man pages don't show
: any real good examples.
: I just want the ability to delete files that are 10 days or older...
: I know it's something with a "find . ???? | rm    or an exec command at the
: end.
 
try man find 
example 6 is what you want



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help - For the UNIX command Gods
  1997-02-11  5:00 ` Juergen Schroeder
@ 1997-02-13  5:00   ` Matt Foster
  1997-02-14  5:00   ` Alex Nord
  1 sibling, 0 replies; 5+ messages in thread
From: Matt Foster @ 1997-02-13  5:00 UTC (permalink / raw)



Juergen Schroeder (schroedj@ub.uni-marburg.de) wrote:
: Jeff Shervey (jeff.shervey@us.landisstaefa.com) wrote:
: : I'm trying to do something rather trivial...and the man pages don't show
: : any real good examples.
: : I just want the ability to delete files that are 10 days or older...
: : I know it's something with a "find . ???? | rm    or an exec command at the
: : end.
:  
: try man find 
: example 6 is what you want

There are some pretty nasty security implications to this 
kind of command ..........

Matt


| Matt Foster | Transactional Systems | DiverseyLever |
| +44 (0)1 494 468 380 (V) | +44 (0)1 494 468 217 (F) |
| The above views are my personal opinions and may    |
| not reflect the opinion or policy of DiverseyLever. |




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Help - For the UNIX command Gods
  1997-02-11  5:00 ` Juergen Schroeder
  1997-02-13  5:00   ` Matt Foster
@ 1997-02-14  5:00   ` Alex Nord
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Nord @ 1997-02-14  5:00 UTC (permalink / raw)



Juergen Schroeder wrote:
> 
> Jeff Shervey (jeff.shervey@us.landisstaefa.com) wrote:
> : I just want the ability to delete files that are 10 days or older...
> : I know it's something with a "find . ???? | rm    or an exec command at the end.

The exact syntax (when run from the base directory you want to start
searching) 
would be :   find . -atime +10 -exec rm {}
Just watch out where you run a command like this from.  If you were to
run it from
the root directory with root access, you could hose a LOT of necessary
files...



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-02-14  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-02-10  5:00 Help - For the UNIX command Gods Jeff Shervey
1997-02-10  5:00 ` Marek Pola
1997-02-11  5:00 ` Juergen Schroeder
1997-02-13  5:00   ` Matt Foster
1997-02-14  5:00   ` Alex Nord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox