Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-27-2006, 09:55 PM   #1
LQ Newbie
Registered: Aug 2006
Location: Chicago
Distribution: Debian
Posts: 11

Rep: Reputation: 0
Change file extentions in a directory tree

I'm tying to pipe two commands in order to change .htm files to .html
in a directory tree. Both commands work separately but not when piped.

1st find /root/Desktop/Cisco -name *.htm

2nd rename .htm .html *.htm

[me@box Cisco]# find /root/Desktop/Cisco -name *.htm | rename .htm .html *.htm

rename: renaming *.htm to *.html failed: No such file or directory
[me@box Cisco]#

Old 11-27-2006, 10:13 PM   #2
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 32
Did you try
find /root/Desktop/Cisco -name *.htm -exec rename .htm .html '{}' \;
Old 11-27-2006, 10:22 PM   #3
LQ Newbie
Registered: Aug 2006
Location: Chicago
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
Perfect, Thank you


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to create a tar file from spanning a directory tree? R00ts Linux - General 2 11-01-2006 11:15 AM
problems with accessing file type extentions (lrwxrwxrwx)...need to change drwxrwxrwx harshaarchak Linux - General 5 08-28-2006 02:26 AM
duplicate directory tree for only certain file types curmudgeon42 Linux - Software 13 01-22-2005 03:38 PM
frontpage 2003 file extentions bwarn Linux - Software 4 11-12-2003 09:00 AM
changing file extentions Seraph Linux - Newbie 3 09-17-2003 03:42 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration