Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

determine the output of the following command: echo ${new:-variable}

912


write a shell script to check the failed jobs?

4350


Explain about shebang?

984


Explain about the slow execution speed of shells?

1159


What is @echo off?

937


What is the lifespan of a variable inside a shell script?

1573


How do you know which shell I am using?

983


What is $1 in shell scripting?

981


What happens on a system call?

946


What is mac default shell?

1048


What is the way to do multilevel if-else's in shell scripting?

1236


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

6315


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.

2701


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?

1053


What is a boot block?

960