Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
File renaming through multiple subdirectories
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lizardcry
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 87
Location: Iceland

PostPosted: Thu Jul 28, 2005 9:50 pm    Post subject: File renaming through multiple subdirectories Reply with quote

Any help would be greatly appreciated.

I'd like to have a bash script recurse through multiple subdirectories and simply add an extension to all files found in the subdirectories. The extension is ".wpd". I would think I could pipe the output of 'find' to the 'mv' command. But, I am cannot figure it out.

Again, any help would be appreciated.
Back to top
View user's profile Send private message
Alighieri
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2005
Posts: 88

PostPosted: Fri Jul 29, 2005 1:34 am    Post subject: Reply with quote

Code:
find . -type f -exec mv {} {}.wpd \;
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum