Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Moving and Renaming Files

July 19, 1998

The "mv" utility can perform two functions. First, it will move a file from one location to another such as in the following case in which the file.txt is moved one directory up.

mv file.txt ../

However, if you specify a name other than the name of the file, it will move the file AND rename it. Thus, to rename a file you simply move it to the same directory but use a new name such as:

mv file.txt new_name.txt

Moving is useful because instead of copying a file (which leaves two versions of the file to take up disk space and introduce confusion), the mv utility makes sure that there is only one copy.

The mv follows the standard syntax of:

mv [option] file1 file2
mv [option] space_delimited_file_list directory_name

There is only one option, the -f option which overwrites the existing file regardless of the permissions.

Additional Resources:

Copying Files
Introduction to UNIX for Web Developers | Table of Contents
Deleting Files


Up to => Home / Internet / UNIX / Intro




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers