LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-27-2006, 08:55 PM   #1
threelions66
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]#

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

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

Original Poster
Rep: Reputation: 0
Perfect, Thank you
 
  


Reply


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 10:15 AM
problems with accessing file type extentions (lrwxrwxrwx)...need to change drwxrwxrwx harshaarchak Linux - General 5 08-28-2006 01:26 AM
duplicate directory tree for only certain file types curmudgeon42 Linux - Software 13 01-22-2005 02:38 PM
frontpage 2003 file extentions bwarn Linux - Software 4 11-12-2003 08:00 AM
changing file extentions Seraph Linux - Newbie 3 09-17-2003 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:48 AM.

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