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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-04-2008
jxh461 jxh461 is offline
Registered User
  
 

Join Date: Jun 2002
Posts: 49
renaming files

I have a list of files named ab_*.csv

I would like to remane them all by removing the ab_ and have *.csv

I did the following but I am surely missing something.

/* wrong script */
for i in `ls -1 ab_*`; do mv ab_$i $i; done

Thanks in advance.