The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: Renaming files
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 01-06-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline
Disorganised User
 

Join Date: Nov 2007
Location: New Zealand
Posts: 742
Quote:
Originally Posted by mehmet_demirez View Post
extending previous solution for subfolders:

for file in `find .`
do
mv $file `echo $file | sed 's/:/_/g'`
done
I'd suggest adding a '-type f' to the find command to to avoid it matching directories too?
Reply With Quote