linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: oldest file
@ 2003-02-06 17:39 Scott Taylor
  2003-02-06 21:46 ` Mat Harris
  0 siblings, 1 reply; 7+ messages in thread
From: Scott Taylor @ 2003-02-06 17:39 UTC (permalink / raw)
  To: linux-admin

At 09:16 AM 2/06/03, you wrote:
>i meant that more pictures could be taken on one day than others. I already
>know perl but the perl lists haven't got any ideas.
>
>Let me try it from another angle. I want to keep disk usage at percentage
>level defined in $x.
>
>I want to delete the oldest day in order to keep this level. I have to
>delete one day at a time, and only if a second usage check also show above
>the level, can i delete another day.
>
>I have to keep deletetions to a minimum while keeping the disk healthy as
>people will want to keep their archives for as long as possible.

You could still use find, it can go by the minute if you like.

ls -alt|head -5
will give you the 5 most recent files (usually . and .. first)
ls -alt|tail -5
will give you the 5 oldest



^ permalink raw reply	[flat|nested] 7+ messages in thread
* oldest file
@ 2003-02-06 10:01 Mat Harris
  2003-02-06 16:37 ` Scott Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Mat Harris @ 2003-02-06 10:01 UTC (permalink / raw)
  To: linux-admin

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

i am sure this has been asked before, but I can't find trace of it in any
archives.

I need to find the oldest directory inside multiply subdirectories. Perhaps
I should explain...

I have /home/cams/
inside that dir is four other dirs: cam1 cam2 cam3 cam4
inside each of those is a directory structure like: year/day-date/

i want to run a script that searches for the oldest day in each cam
directory.

What is the best way to do this.

btw, the oldest days are rm -rf'd when found.

-- 
Mat Harris			OpenGPG Public Key ID: C37D57D9
mat.harris@genestate.com	www.genestate.com	

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

end of thread, other threads:[~2003-02-06 21:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-06 17:39 oldest file Scott Taylor
2003-02-06 21:46 ` Mat Harris
  -- strict thread matches above, loose matches on Subject: below --
2003-02-06 10:01 Mat Harris
2003-02-06 16:37 ` Scott Taylor
2003-02-06 16:42   ` Mat Harris
2003-02-06 16:55     ` Scott Taylor
2003-02-06 17:16       ` Mat Harris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).