Occasionally I'm downloading a series of files, be it episodes of
films, chapters of documents, etc., and I'm numbering the files with
a name indicating the document and containing a sequence number 1..N
and I want them also stored with ascending file system time-stamps.
Given that I trigger my downloads in parallel I have to 'touch' the
files in the correct order afterwards. So far the use case.
What I lazily did was, say, touch name*.pdf but while the shell's
file expansion lists sequentially name1.pdf name2.pdf ... name8.pdf
the 'touch' command seems to _operate_ arguments in *reverse* order.
It's no biggie, but I had been wondering about that behavior. I'd at
least have expected an option available with 'touch' to control that,
or that the files are handled sequentially as provided as arguments.
I had thus written my own 'touchlist' script/hack to "fix" that. But
I'd be curious about thoughts concerning that behavior of 'touch' (or
alternative approaches).
Janis
Time-stamping files
- From
- Janis Papanagnou <jani…@hotmail.com>
- Organization
- A noiseless patient Spider
- Message-ID
- <11d9…@dont-email.me>
- Date
- Newsgroups
- comp.unix.shell