mv Top Level
mv
- Quick and Concise Document
- Beginners
Command Description
------- -----------
mv file1 file2 Move file1 to file2, deleting file1.
mv file1 /dir Move file1 into the specified directory.
Use the mv command to move either move a file to a new location or to
give it a different name, keeping it in its current directory.
mv file1 target
file1 is moved to target. Under no circumstance can file1 and target
be the same (take care when using metacharacters). If target is a
directory, then one or more files are moved to that directory. If
target is an existing file, its contents are destroyed.
For mv, if file1 is a directory the rename will occur only if file1 and
target are in the same file system. If file1 is a file and target is a
link to another file with links, the other links remain and target
becomes a new file.
If you want to place a copy of a file in the current directory into
another directory, you must give the full pathname to that directory:
world% mv my.article /tmp
The -p option will cause the modification time, permissions, owner, and
group of the target to be set to those of file1 after the file is moved.
If the -i option is specified the user is prompted with the message:
overwrite target?
If the user answers with a line starting with `y', the copy continues.
Any other reply prevents the command from completing.
If the -r option is specified with mv and any of the source files are
directories, mv copies each subtree rooted at that name; in this case
target must be a directory.
HOME Top of Help Desk Eye On The World The World Kiosk
For further assistance, please send an email
request to support@world.std.com
Copyright 1995 Software Tool & Die, Inc. All Rights Reserved.
Software Tool & Die, Inc., 1330 Beacon St. Suite 215 Brookline, MA 02146