From: Tom McCarrick <Tom.McCarrick () unilever ! com>
To: tru64-unix-managers
Subject: Variation on find
Date: Mon, 19 Jun 2000 10:56:58 +0000 [thread overview]
Message-ID: <96141232209949.tru64-unix-managers.marc@archive.invalid> (raw)
Hi
I am trying to use the 'find' command in a situation where I can display all
the files older than a certain date, in a certain directory but without
descending down the hierarchy.
I have put the command in a shell script called 'showold' as follows:
'find . -prune -mtime +$1 -exec ls -ltr {} \;
and to invoke it I type e.g. 'showold 5' - (shows all files older than 5 days).
However, it will show files in subdirectories also (which I don't want). The
'prune' modifier does not restrict the find to the current directory, as I
hoped ir would.
Am I missing something on the command line, or is there another way around this?
TIA
Tom Mc Carrick
Sys Admin
Van den Bergh Foods
Tom.mccarrick@unilever.com
reply other threads:[~2000-06-19 10:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox