The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-03-2006
propel propel is offline
Registered User
 

Join Date: Mar 2006
Posts: 4
Rename a file if I don't know its exact original name?

Hi everyone,

I will be downloading a file every day with the name in this format

SCA20060303_17514_IN.TXT

And I need to rename it to

SCA20060303_IN.TXT

Where "20060303" is the current date, and the "_17514" part will always be a 5-digit number that I will NOT know beforehand. I just need to take it out.

I've always used the mv filename1 filename2 command to rename files but how can I do this if I don't know the exact original name of the file?

Thanks,

Ryan
Reply With Quote
Remove advertisements
!!
Forum Sponsor