commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
There is 1 alternative - vote for the best!
Changing a file extension to a new one for all files in a directory.
An entirely shell-based solution (should work on any bourne-style shell), more portable on relying on the rename command, the exact nature of which varies from distro to distro.
This command can be used to rename all the files with extension .xls( in this case) to .ods files. It can be used for other files with certain extension.
The 'rename' command with the first argument as "'s/\.//'" and the second argument as "" will remove the specified extension from the filenames.
If you can do better, submit your command here.
You must be signed in to comment.