Mv
From Wikipedia, the free encyclopedia
For other uses, see Mv (disambiguation).
- The correct title of this article is mv. The initial letter is shown capitalized due to technical restrictions.
Wikibooks has more about this subject:
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
Unix command line programs and builtins (more) | |||
File and file system management: | cat | cd | chmod | chown | chgrp | cp | du | df | file | fsck | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
Text processing: | awk | comm | cut | ex | head | iconv | join | less | more | paste | sed | sort | tail | tr | uniq | wc | xargs | ||
Shell programming: | echo | expr | printf | unset | Printing: | lp |
Communications: inetd | netstat | ping | rlogin | traceroute |
Searching: find | grep | strings |
Miscellaneous: banner | bc | cal | man | size | yes |