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
How does ls command work?
Explain about stdin, stdout and stderr?
How to calculate the number of passed arguments?
How important is shell scripting?
What is a shell script? Can you name some of its advantages?
How does path variable work?
What does path stand for?
What are the advantages of shell script?
What is the use of a shebang line?
What is bash command used for?
Differentiate between ‘ and ” quotes.
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
Give some situations where typing error can destroy a program?
how to get part of string variable with echo command only?
How do I run a shell script on a mac?