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 / akshay telang
for i in `find . -name "*.txt"`
> do
> mv $i ${i%.txt}.my
> done
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
What is .sh file in mac?
What does $@ mean bash?
What is shell scripting?
What does $1 mean in bash?
Is powershell a bash?
How can I set the default rwx permission to all users on every file which is created in the current shell?
What is shell geeksforgeeks?
How to redirect both standard output and standard error to the same location?
How would you compare the strings in a shell script?
What is awk script?
c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again
Can you write a script to portray how set –x works?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What shell is bin sh?
What is the significance of the shebang line in shell scripting?