linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mat Harris <mat.harris@genestate.com>
To: Scott Taylor <scott@dctchambers.com>
Cc: linux-admin@vger.kernel.org
Subject: Re: oldest file
Date: Thu, 6 Feb 2003 16:42:54 +0000	[thread overview]
Message-ID: <20030206164254.GA12196@genestate.com> (raw)
In-Reply-To: <5.1.1.6.0.20030206082853.01cef8c8@mustang>

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

yes but the problem with that is that the day could be of variable size and
I can't remove more than necessary so removing day 20 may be equivalent to
removing days 19-15

On Thu, Feb 06, 2003 at 08:37:55 -0800, Scott Taylor wrote:
> At 02:01 AM 2/06/03, Mat Harris wrote:
> >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 happens if the oldest day is the only file and that file is today's?
> 
> Wouldn't you rather just remove all files older than X number of days?  You 
> could do this with the find command; find files changed 20 days ago and 
> more:
> find /home/cams/ -ctime +20 -exec rm -rf {} \;
> 
> for more info:
> man find
> 
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

  reply	other threads:[~2003-02-06 16:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-06 10:01 oldest file Mat Harris
2003-02-06 16:37 ` Scott Taylor
2003-02-06 16:42   ` Mat Harris [this message]
2003-02-06 16:55     ` Scott Taylor
2003-02-06 17:16       ` Mat Harris
  -- strict thread matches above, loose matches on Subject: below --
2003-02-06 17:39 Scott Taylor
2003-02-06 21:46 ` Mat Harris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030206164254.GA12196@genestate.com \
    --to=mat.harris@genestate.com \
    --cc=linux-admin@vger.kernel.org \
    --cc=scott@dctchambers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).