Following command finds .html files in the current working directory and changes the extension to .htm. The command illustrates the use of rename with find's exec switch. A quick way of finding and renaming files.
find . -name "*.html" -exec rename .html .htm {} \;
Find is regarded as a power command by many Linux users. The above example supports the claim ! There are many seemingly complicated or time consuming tasks which can be done quickly with commands.
Sunday, July 16, 2006
Subscribe to:
Post Comments (Atom)
1 comment:
Removing everything older than a year..
find . -mtime +365 -exec rm -r {} \;
Post a Comment