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 / 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


Please Help Members By Posting Answers For Below Questions

What is bash coding?

974


Explain about return code?

1120


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?

1158


What is shell chemistry?

1028


What lives in a shell?

1007


What is shell and terminal?

1048


What is the difference between scripting and coding?

1096


I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

1070


Which scripting language is best for automation?

1003


What is the significance of the shebang line in shell scripting?

1197


What is the best shell scripting language?

1066


How to pass an argument to a script?

1286


What is scripting autism?

1261


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

1440


What is the best scripting language?

1075