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

It can be done using the xargs command of Unix ...
cd to the dir containing the *.txt files

$ls *.txt | xargs -i mv \{\} \{\}.my

Is This Answer Correct ?    5 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is used in shell scripting?

999


What is console line?

963


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

1227


What does sh mean?

1051


How to check if the previous command was run successfully?

1041


How to redirect both standard output and standard error to the same location?

1166


Is shell a scripting language?

1015


What is the difference between grep and egrep?

1136


How do I stop script errors?

1125


What is computer cli?

898


one folder contains lot of students name but I want to fetch hello with every student name individually using shell script

953


What is web script?

1085


What language is bash?

922


Explain about the slow execution speed of shells?

1224


How do I run a .sh file?

1018