Linux/Unix Commands





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
LINUX / UNIX cmd
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Introduction
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example A
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example B
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example C
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example D
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example E
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example F
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example G
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example H
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example I
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example J
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example K
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example L
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example M
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example N
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example P
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example R
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example S
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example T
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example U
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example V
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example W
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Y
Forums Ask your doubts
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example More about Linux
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Feedback
 





mv Linux Commands


Tutorials Linux-commands

Topic

What is Linux mv Command?



Explanation

mv COMMAND:
     mv command which is short for move. It is used to move/rename file from one directory to another. mv command is different from cp command as it completely removes the file from the source and moves to the directory specified, where cp command just copies the content from one file to another.

SYNTAX:
  The Syntax is
     mv [-f] [-i] oldname newname

OPTIONS:
     
-f This will not prompt before overwriting (equivalent to --reply=yes). mv -f will move the file(s) without prompting even if it is writing over an existing target.
-i Prompts before overwriting another file.



EXAMPLE:
     
  1. To Rename / Move a file:
    mv file1.txt file2.txt 

    This command renames file1.txt as file2.txt

  2. To move a directory
    mv hscripts  tmp

    In the above line mv command moves all the files, directories and sub-directories from hscripts folder/directory to tmp directory if the tmp directory already exists. If there is no tmp directory it rename's the hscripts directory as tmp directory.

  3. To Move multiple files/More files into another directory
    mv file1.txt tmp/file2.txt newdir

    This command moves the files file1.txt from the current directory and file2.txt from the tmp folder/directory to newdir.






A Note

Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.


Other Links

web hosting

 

Free Hosting

Top Hosting Companies