tonydba
asked on
changefilename
in unix how can you rename usedindex to usedindex.sql
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you're just renaming one at a time use mv file file.sql as Dan Cracium as pointed out. This command will work on all POSIX compliant systems.
The rename script is a relatively "modern" perl script for renaming multiple files and may or may not exist on your system depending on the gnu packages you have installed. It's certainly not default on Solaris. It's probably on most of the popular distros of linux, but likely not on DSL or any of the distros designed for a tiny footprint. Depending on your environment, you may not want to use or rely on rename.
You would use perl regular expressions for remane:
rename * *.sql
rename 's/\.bak$//' *.sql
The rename script is a relatively "modern" perl script for renaming multiple files and may or may not exist on your system depending on the gnu packages you have installed. It's certainly not default on Solaris. It's probably on most of the popular distros of linux, but likely not on DSL or any of the distros designed for a tiny footprint. Depending on your environment, you may not want to use or rely on rename.
You would use perl regular expressions for remane:
rename * *.sql
rename 's/\.bak$//' *.sql
ASKER
Thank you.
#rename usedindex usedindex.sql usedindex
TY/SA