Solved

changefilename

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

Accepted Solution

by:
Dan Craciun earned 500 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 27

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now