GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Rename File Extension |
To rename all files having a specific extension to a different extension we can use the grouping operator in the regexp and reference the matched string in the replacement pattern.
$ rename 's|(.*).tar.gz|$1.tgz|' * |