[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the best way to touch a file and set its time of the last ti
From: |
Stephane Chazelas |
Subject: |
Re: What is the best way to touch a file and set its time of the last time of a bunch of other files? |
Date: |
Mon, 31 Aug 2015 15:56:49 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
2015-08-07 02:21:07 -0500, Peng Yu:
> Hi, `touch -r` allows one to set the time of a file same as a
> reference file. What if one wants to set the time to be the last time
> of multiple files? Is there an easy way to do so?
[...]
With zsh,
touch -r /path/to/*(om[1]) file
Would set file's time to that of the newest non-hidden file in
/path/to.
--
Stephane