On Wed, Aug 25, 2004 at 12:16:17AM +0200, Joachim Dagerot wrote: > A quiz easy to write, hard to answer? > > In bash, how can I write a command that moves the oldest file in a > directory to a new direction?
Here is one possible way, certainly there are many others: # ls -t /path/to/dir | tail -n 1 | xargs -i{} cp {} /path/to/location Nathan -- PGP Public Key: pgp.mit.edu:11371/pks/lookup?op=get&search=0xD8527E49
pgpkYHPCddyQb.pgp
Description: PGP signature