[Top] [Prev] [Next]


mv - rename/move files


mv fromfile tofile 
mv fromfile... todir 


The mv command can be used in several ways.

If there are two arguments of the same type (i.e., both directories or both not) then mv will rename the fromfile to tofile.

For files, a previously file named tofile will be (silently) removed. This requires write permission for the current directory. Write permission is not needed for tofile.

For directories, a previously named directory tofile will be (silently) removed if empty; otherwise, the action will fail.

If the last argument is a directory, the earlier arguments (all files) will be moved into that directory. Any previously existing files of the same name will be overwritten.

Directories cannot be moved into other directories.

See Also

changing file attributes (e.g., name)


removing files and directories

[Top] [Prev] [Next]

Copyright © 1996,Lucent Technologies, Inc. All rights reserved.