Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: copy the newest file



On Thu 02.Aug.07 14:30, fREW wrote:
I am working on a little script that will run as a cron job and copy a
few files to another computer via scp.  I only want to copy the newest
one.  How do I get that newest file?  This is what I have figured out
so far:

/backups/daily/database*(om)

That will be a list of all the files starting with database and the
most recently modified first.  How can I just pick off the first one
from the list?  Also: where can I look in the man files for such
things?

*(om[1]) should do it.

Cheers.

--
redondos

Attachment: signature.asc
Description: Digital signature



Messages sorted by: Reverse Date, Date, Thread, Author