rename a number of files with git
I have a director开发者_JAVA百科y called clients. In this directory there are more directories and some files. All the file names start with double underscore as given below. All the files in clients directory or within the directories within clients have file names starting with double underscore.
client1/
client2/
__a.txt
__b.txt
I need to rename all the files to a single underscore. All the files are in github so we use git.
What would be a good tool I should read up on. sed / awk ?
If your (unix?) system has the rename command:
cd client2
rename 's/^__/_/' *
精彩评论