Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: copy the newest file
- X-seq: zsh-users 11700
- From: Angel Olivera <redondos@xxxxxxxxxxx>
- To: Zsh users list <zsh-users@xxxxxxxxxx>
- Subject: Re: copy the newest file
- Date: Thu, 2 Aug 2007 18:58:46 -0300
- In-reply-to: <fb3648c60708021330y676606c0h42cd6a4a7300317e@xxxxxxxxxxxxxx>
- Mail-followup-to: Zsh users list <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <fb3648c60708021330y676606c0h42cd6a4a7300317e@xxxxxxxxxxxxxx>
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