KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to rename all the files in a folder which starts with 123_xxx.txt to xxx.txt . For example, my directory has: 123_xxx.txt 123_yyy.txt 123_zzz.txt I want to rename all files as: xxx.txt yyy.txt zzz.txt I have seen some useful bash scripts in this forum but I'm still confused how to use it for my requirement. Let us suppose I use: for file in `find -name '123_*.txt'` ; do mv $file {?.txt} ; done Is this the correct way to do it?
Tags (comma-separated)
Save Edits
Cancel