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 / nagesh
for file in *.txt
do
mv $file $file.my
done
| Is This Answer Correct ? | 5 Yes | 10 No |
Post New Answer View All Answers
What is bash coding?
Explain about return code?
How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?
What is shell chemistry?
What lives in a shell?
What is shell and terminal?
What is the difference between scripting and coding?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
Which scripting language is best for automation?
What is the significance of the shebang line in shell scripting?
What is the best shell scripting language?
How to pass an argument to a script?
What is scripting autism?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
What is the best scripting language?