Re: mv files by date



Curtis Vaughan wrote:

Can someone tell me the correct command line for moving a bunch of
files between directories that are, say, older than yesterday while
preserving their time stamps?

find . <paramters to select appropriate files> \
while read FILE ; do mv $FILE other-directory/$(basename $FILE)
done

Read find(info), bash(1), and mv(1) for more details.

Best,

Matěj

--
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
http://www.ceplovi.cz/matej/blog/, Jabber: ceplma@xxxxxxxxx
23 Marion St. #3, (617) 876-1259, ICQ 132822213

There are lies, damned lies, and quotes from literary icons.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: mv files by date
    ... Ok the following line finds all the files that I want to move out the folder: ... now it's the next part that scares me. ... There are lies, damned lies, and quotes from literary icons. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: something touching my files
    ... My time stamps keep ... getting renewed occasionally, which mucks up CVS. ... There are ZERO changes to ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • mv files by date
    ... Can someone tell me the correct command line for moving a bunch of files between directories that are, say, older than yesterday while preserving their time stamps? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: mv files by date
    ... preserving their time stamps? ... With Z shell: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)