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
I have 2 files and I want to print the records which are common to both.
What is a program shell?
What is shell environment?
What is awk script?
Is bash a shell script?
What is shell prompt?
How do you create a shortcut in linux?
What does it mean to debug a script?
Explain about debugging?
What is the difference between scripting and coding?
wats the deinitions for shell utility and filter?
What is sudo command?
What does $@ mean in shell?
How do we create command aliases in a shell?
How do I stop script errors?