Solved

changefilename

Posted on 2014-04-02
4
76 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 28

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wifi not working on Raspberry Pi 3? 2 54
Linux VM 6 88
ftp to port 21 4 43
How to retrieve remote exit code when using rsh from Linux to Windows ? 13 40
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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

770 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