BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

 

 

 
 

Moving and renaming files

Oracle Tips by Burleson Consulting

There will come a time when you will need to move a file or maybe a group of similarly named files to a different directory; or maybe you would just like to rename a file to a new name. The mv (move) command is used to perform both move and rename functions.

The rules for mv are similar to those for rm described earlier, in that file references can be via a fully qualified path or via a relative path. The use of the wildcard symbols in the filename is also allowed. Let’s take a look at some examples.

Move file example1.fil from the current working directory to the /tmp directory:

mv touch1.fil /tmp

Move file example1.fil using the fully qualified path to the /tmp directory:

mv /home/tclark/touch1.fil /tmp

Create and rename example1.fil in the /tmp directory to example1.xxx (we are in our home directory):

Directory:~
$ cd /tmp

Directory:/tmp
$ touch temp1.fil temp2.fil create files in /tmp

Directory:/tmp
$ ls -l temp*
-rw-rw-r-- 1 tclark tclark 0 Jan 13 21:15
temp1.fil
-rw-rw-r-- 1 tclark tclark 0 Jan 13 21:15
temp2.fil

Directory:/tmp
$ cd - change to my home
directory
/home/tclark

Directory:~
$ mv /tmp/temp1.fil /tmp/temp1.xxx rename a file
in the /tmp directory

Directory:~
$ cd - switch back to /tmp
/tmp

Directory:/tmp
$ ls temp* verify the file was
renamed
temp1.xxx temp2.fil

Directory:/tmp
$


Rename example2.fil in the current working directory to example2.xxx:

Directory:~
$ ls
examples

Directory:~
$ touch example1.fil example2.fil create 2 files
in my home directory

Directory:~
$ ls
example1.fil example2.fil examples

Directory:~
$ mv example2.fil example2.xxx rename 1 of the files

Directory:~
$ ls verify the file
was renamed
example1.fil example2.xxx examples


The above book excerpt is from:

Easy Linux Commands
Working Examples of Linux Command Syntax

ISBN: 0-9759135-0-6   

Terry Clark 


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

 

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter