Linux-admin Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
* simple scripting question
@ 2003-01-27  9:58 urgrue
  2003-01-27 13:06 ` Glynn Clements
  2003-01-28  2:03 ` Mikhail Romanenko
  0 siblings, 2 replies; 3+ messages in thread
From: urgrue @ 2003-01-27  9:58 UTC (permalink / raw)
  To: linux-admin

i have several dirs and i want to delete the ones that are older than 
60 days.
currently im doing it like this:
find /path/backups-*  -type d -mtime +60 | xargs rm -r

but i dont want to go through the CONTENTS of the dirs and delete every 
individual file that is older than 60d. i want to either delete or not 
delete the whole dir depending on its timestamp.

but i only know of find that accepts something as spiffy as -mtime +60, 
and i cant find any options for it like "--non-recursive".

any suggestions?
basically this is for removing outdated backups.

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

end of thread, other threads:[~2003-01-28  2:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-27  9:58 simple scripting question urgrue
2003-01-27 13:06 ` Glynn Clements
2003-01-28  2:03 ` Mikhail Romanenko

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