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 does $@ mean bash?
write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.
Explain how you Automate your application using Shell scripting.
What is shell application?
Is powershell a language?
Is shell scripting difficult?
What is the use of break command?
What is awk in shell scripting?
Why is used in shell scripting?
Differentiate between ‘ and ” quotes.
How do I open a jshell in cmd?
What is subshell?
I want to connect to a remote server and execute some commands, how can I achieve this?
What shell is bin sh?
What does echo $0 do?