[wplug] bash script for numbering filenames by date
Russ Schneider
russ at sugapablo.com
Mon Jun 21 10:43:29 EDT 2004
On Mon, 21 Jun 2004, Poyner, Brandon wrote:
> Not very pretty, I'd probably do this in perl, but this will prepend the
> file modification date to the file name. Remove the echo to make it
> really do the job.
>
> for i in * ; do date=`stat -c '%y' $i | awk -F ' ' '{print $1}'` ; echo
> mv $i $date'_'$i ; done
Thanks. I believe that will do nicely. :)
--
[ Russ Schneider (a.k.a. Sugapablo) ]
[ http://www.sugapablo.com <--music ]
[ http://www.sugapablo.net <--personal ]
[ sugapablo at 12jabber.com <--jabber IM ]
More information about the wplug
mailing list