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

I have 2 files and I want to print the records which are common to both.

1167


What is a program shell?

1056


What is shell environment?

1007


What is awk script?

991


Is bash a shell script?

1071


What is shell prompt?

1025


How do you create a shortcut in linux?

1217


What does it mean to debug a script?

1064


Explain about debugging?

1037


What is the difference between scripting and coding?

1048


wats the deinitions for shell utility and filter?

2327


What is sudo command?

1069


What does $@ mean in shell?

1048


How do we create command aliases in a shell?

1010


How do I stop script errors?

1145