Peter Hardy wrote:
for file in `ls`; do date=`ls -l --time-style=long-iso "$file" | awk '{ print "$6 $7" }' newname=`date -d "$date" +%Y%m%d%H%M` mv "$file" $newname
Er, that should be awk '{ print $6" "$7 }'
* Only partially tested. Your mileage liable to variance.
...told you so. -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html