mv

OS/161 Reference Manual

Name

mv - rename or move files

Synopsis

/bin/mv oldname newname

Description

mv renames the filesystem object specified by oldname so that it is subsequently named newname. Both files and directories can be renamed or moved into other parts of the filesystem tree. However, devices may not be renamed and filesystem objects may not be moved across filesystems.

mv accepts no options.

Note that mv does not support the Unix idiom mv file1 file2 ... destination-dir to move a number of files at once. In particular, mv foo bar/ will fail, probably with "Is a directory".

Requirements

mv uses the following system calls:

As the rename system call is generally not part of the basic system calls assignment, mv will usually still not function after the basic system calls assignment is complete. This call is typically part of a later assignment, usually the file system assignment. Once you implement the system call you should be able to rename objects within the same directory. To move things between directories you will need to implement cross-directory support for rename at the file system layer. This may or may not be part of your file system assignment; consult your course materials for specific information.

See Also

cp, ln