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 to use arguments in a script?

1032


What is wc in shell script?

933


Explain about non-login shell files?

1132


How to calculate the number of passed arguments?

997


write a shell script to check the failed jobs?

4351


How to get the 3rd element/column from each line from a file?

1140


Suppose you execute a command using exec, what will be the status of your current process in the shell?

1019


Why is it called a shell?

878


How to get the first line from a file using just the terminal?

1051


What will happen to my current process when I execute a command using exec?

974


What are script files?

967


How does ls command work?

972


What is a program shell?

983


Is shell scripting difficult?

887


What is the difference between grep and egrep?

1067