The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 01-06-2008
Duke_Lukem Duke_Lukem is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 3
Lowercase to Uppercase file names

Quote:
Originally Posted by cassj View Post
Give this a shot. This will change ALL filenames in the current directory from lower to UPPER.
Code:
cd /path/to/your/files

for file in * ; do mv $file `echo $file | sed 's/\(.*\)/\U\1/'` ; done
Hi cassj,

I tried the above code you generously provided, however the only thing that the code does is add a "U" to the beginning of each filename in the the directory.

Is there some syntax that is slightly incorrect here???
Thanks for your help!