>mv_
The mv
move a file from a directory to another:
Device-name:Current-position username$ mv path/name-file path2
You can verify the success of the operation by using the command ls with argument the path.
With mv you can rename a file: Device-name:Current-position username$ mv path/name-file mv path/newname-file
mv /home/user/desktop/file.txt /home/user/desktop/subfolder1/
-i
Prompt(request confirm) before overwriting the file (Overrides previous -f or -n options, and override file permission)
Example: mv -i name1.txt name2.txt, shell will ask overwrite 'name2.txt'? respond with Y(yes) or N(no)-n
Don't permit to overwrite existing file
Example: desktop as working directory there is a file called name2.txt, mv -n name5.txt name2.tx, with the flag -n you can't overwrite the file.-v
(verbose) will output information explaining what it's doing
Example: mv-v name1.txt name2.txt, the shell will output the operation: 'name1.txt' -to 'name2.txt'.-f
(Force) force overwriting without prompting (overrides previous -i or -n options).
Example: desktop as working directory there is a file called name2.txt, mv-f name1.txt name2.txt will overwrite the file without prompting