How to rename all the files in a folder having specific
extension?
Example: I have some files with extension (.txt) in a folder
name 'Test'. I have to rename all the .txt files in a test
and its subdirectories to .my extension.
Answer Posted / indu sharma
find . -name "*.txt" -exec ls {} \; | xargs -n1 -I{} sh -c 'mv "{}" `echo "{}"|basename "{}" .txt`.my'
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are the 3 standard streams in linux?
What is the best scripting language?
Explain about debugging?
How do I stop script errors?
What is basename in shell script?
How many fields are present in a crontab file and what does each field specify?
What are script files?
Is shell script a programming language?
How does path variable work?
What is shell environment?
How to check if the previous command was run successfully?
What does $$ mean in shell script?
Explore about environment variables?
What are the different types of shell scripting?
What is a command line shell?