|
|
|
|
|
|
![]() |
#1 |
Are you sure this is the Sci-Fi Convention? It's full of nerds!
|
Shell batch rename command/script
I'm hoping someone can help me figure out how to batch rename files recursively thru a directory on our server......ie I'd like to rename all files starting with "thumb_" to "tn_" leaving the remainder of the file name intact so that thumb_pic01.jpg would be renamed tn_pic01.jpg
Any help is greatly appreciated ![]()
__________________
Submissions Wanted! |
![]() |
![]() |
![]() |
#2 |
Vagabond
|
find . -name "thumb_*.jpg" -exec echo "mv '{}' '{}'" \; | sed 's/thumb_/tn_/2' | /bin/sh
|
![]() |
![]() |
![]() |
#3 |
Are you sure this is the Sci-Fi Convention? It's full of nerds!
|
Nice one swedeguy Thanks alot!
![]()
__________________
Submissions Wanted! |
![]() |
![]() |
![]() |
#4 |
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
|
Also MMV is a very nice tool for the shell which can not rename only, you also can move files, folders etc.
|
![]() |
![]() |
![]() |
#5 | |
You can now put whatever you want in this space :)
|
Quote:
You're genius! I wish I knew this earlier! |
|
![]() |
![]() |
![]() |
|
|