Re: mv files by date
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matej Cepl wrote:
> 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.
OpenVMS does it the easy way.
$ RENA/LOG/BEF=YEST *.LOG;* [.NEW_DIR]
Or, explicitly:
$ RENAME/LOG/BEFORE=YESTERDAY *.LOG;* [.NEW_DIR]
- --
Ron Johnson, Jr.
Jefferson LA USA
Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE900mS9HxQb37XmcRAkgLAJ92QngduGSW+ATUrE03ffqo1CUAqQCdEuHy
q5czXvIqCr1CTL3ZxLjyAu0=
=JhMu
-----END PGP SIGNATURE-----
Reply to: