Solved

changefilename

Posted on 2014-04-02
4
79 Views
Last Modified: 2014-04-08
in unix how can you rename  usedindex to usedindex.sql
0
Comment
Question by:tonydba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 35

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 29

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Recover Lacie Edmini data. 11 76
Zimbra and Renewing SSL Certficate 9 56
Edit smb.conf-file in Samba om a ReadyNAS 3 71
Linux Server mapping drive using SSH key 9 46
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

737 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