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 to use arguments in a script?
What is wc in shell script?
Explain about non-login shell files?
How to calculate the number of passed arguments?
write a shell script to check the failed jobs?
How to get the 3rd element/column from each line from a file?
Suppose you execute a command using exec, what will be the status of your current process in the shell?
Why is it called a shell?
How to get the first line from a file using just the terminal?
What will happen to my current process when I execute a command using exec?
What are script files?
How does ls command work?
What is a program shell?
Is shell scripting difficult?
What is the difference between grep and egrep?