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

What are the various stages of a linux process it passes through?

1186


What is bash used for?

1016


What is path in shell script?

1100


Write a shell script to get current date, time, user name and current working directory.

1096


is this growing field and what is average package in this?

2305


How to print the first array element?

1042


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

1353


c program to display the information of given file similar to givan by the unix or linux command ls -l

2224


What is the default shell of solaris?

1043


Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?

2162


How to calculate the number of passed arguments?

1108


What is shell geeksforgeeks?

1115


How do I open the shell in cmd?

1146


What is the default ubuntu terminal?

1130


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?

1152