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 / indu sharma
find . -name "*.txt" -exec ls {} \; | xargs -n1 -I{} sh -c 'mv "{}" `echo "{}"|basename "{}" .txt`.my'
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
determine the output of the following command: echo ${new:-variable}
write a shell script to check the failed jobs?
Explain about shebang?
Explain about the slow execution speed of shells?
What is @echo off?
What is the lifespan of a variable inside a shell script?
How do you know which shell I am using?
What is $1 in shell scripting?
What happens on a system call?
What is mac default shell?
What is the way to do multilevel if-else's in shell scripting?
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
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.
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 a boot block?