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

How does ls command work?

1028


Explain about stdin, stdout and stderr?

1172


How to calculate the number of passed arguments?

1089


How important is shell scripting?

1041


What is a shell script? Can you name some of its advantages?

1057


How does path variable work?

969


What does path stand for?

1062


What are the advantages of shell script?

1023


What is the use of a shebang line?

1193


What is bash command used for?

1064


Differentiate between ‘ and ” quotes.

1163


In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?

1144


Give some situations where typing error can destroy a program?

1246


how to get part of string variable with echo command only?

1024


How do I run a shell script on a mac?

1123