in reply to Re^2: Finding Oldest File in a Directory
in thread Finding Oldest File in a Directory
Or you'll get the first file in the oldest directory containing BOT in its name (assuming no file whose name contains BOT is older)ls -td *BOT* | head -1
This still has the possibility of returning a directory name though. Under Unix, this still is a file, although when people say "file", they usually want to exclude directories.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Finding Oldest File in a Directory
by Moron (Curate) on Oct 06, 2005 at 09:47 UTC | |
by Perl Mouse (Chaplain) on Oct 06, 2005 at 09:52 UTC | |
by Moron (Curate) on Oct 06, 2005 at 10:12 UTC | |
by Aristotle (Chancellor) on Oct 08, 2005 at 19:29 UTC | |
|