The UNIX and Linux Forums  

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



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

Join Date: Oct 2006
Posts: 4
simple batch renaming...45-*.php to 46-*.php

in Bash i'm trying to rename directories full of files. the file name pretty much stays the same except for the numerical prefix which will be the same for all files. so, i want to rename these...

45-body.php
45-header.php
45-footer.php
etc.

to...

46-body.php
46-header.php
46-footer.php
etc.

i tried using mv 45-*.php 46-*.php and of course that didn't work. i should be able to do this without writing a complete script right?
Reply With Quote
Forum Sponsor