Shell: Korn: rename file in subdirectory
# rename directory firstfor f in `find . -type d`; do
g=`echo $f | tr '[A-Z]' '[a-z]'`
mv "$f" "$g"
done
# then rename all files in subdirectory
for f in `find . ! -type d`; do
g=`echo $f | tr '[A-Z]' '[a-z]'`
mv "$f" "$g"
done
0 Comments:
Post a Comment
<< Home