?
Solved

changefilename

Posted on 2014-04-02
4
Medium Priority
?
88 Views
Last Modified: 2014-04-08
in unix how can you rename  usedindex to usedindex.sql
0
Comment
Question by:tonydba
4 Comments
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 2000 total points
ID: 39973125
mv usedindex usedindex.sql

Open in new window

HTH,
Dan
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39974716
#mv usedindex usedindex.sql
#rename usedindex usedindex.sql usedindex

TY/SA
0
 
LVL 31

Expert Comment

by:serialband
ID: 39976660
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
0
 

Author Closing Comment

by:tonydba
ID: 39986044
Thank you.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question