Mv

From DssWiki

Jump to: navigation, search

Template:Alternateuses {{DISPLAYTITLE:{{#if:|:|}}mv}} Template:Wikibookspar

mv (short for move) is a Unix command that moves a file or directory from one place to another. The original file is deleted, and the new file may have the same or a different name. If possible (i.e. when the original and new files are on the same file system), mv will rename the file instead.

[edit] Examples

mv myfile mynewfilename    renames a file (assuming "mynewfilename" is not a directory)
mv myfile /myfile          moves 'myfile' from the current directory to the root directory
mv myfile dir/myfile       moves 'myfile' to 'dir/myfile' relative to the current directory
mv myfile dir/             same as the previous command (the filename is implied to be the same)
mv myfile dir/myfile2      moves 'myfile' to dir/ and renames it to 'myfile2'
mv foo bar baz dir/        moves multiple files to directory dir/
mv --help                  shows a very concise help about the syntax of the command
man mv                     prints an extensive user manual for 'mv' in the terminal

[edit] See also

[edit] External links

Template:Unix-stub


<noinclude>
Personal tools
efta 468 03-27-08 JOIN OUR TEAM!!