Mv
From DssWiki
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
{{#if: |
Unix command line programs and builtins (more) | |||
| File and file system management: | cat | chattr | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | fuser | 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 | ed | ex | fmt | head | iconv | join | less | more | paste | pg | sed | sort | tac | tail | tr | uniq | wc | xargs | ||
| Shell programming: | basename | echo | expr | false | printf | test | true | unset | Printing: | lp |
| Communications: inetd | netstat | ping | rlogin | traceroute | Searching: find | grep | strings | Miscellaneous: banner | bc | cal | dd | man | size | yes | |
