Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foo001.a
- foo002.a
- foo003.a
- foo004.a
- foo005.a
- #rename ‘s/foo/bar/’ foo*.a
- #ls
- ------result
- bar001.a
- bar002.a
- bar003.a
- bar004.a
- bar005.a
- -----------
- To remove .jpg file extension, you write command as follows:
- $ rename 's/\.jpg$//' *.jpg
- To convert all uppercase filenames to lowercase:
- $ rename 'y/A-Z/a-z/' *
- Read the man page of rename command for more information:
- man rename
- other :
- rename space to _
- for file in *;do mv $file ${file// /_};done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement