Untitled Document
mv Command

mv - command is used to move or rename files .mv renames file SOURCE to DEST, or moves the SOURCE file (or files) to DIRECTORY.

Example 1 -

Below mv command moves file user.txt to destination directory logs.

   mv user.txt logs      

Example 2

Below command renames the file user.txt to user_old.txt .

   mv user.txt user_old.txt     

Example 3 - We can even move group of files into a directory

Below command moves user.txt, emp.csv, test.ksh files into a directory my_progs

   mv user.txt emp.csv test.ksh my_progs  

Example 4 - Rename a directory

Below command renames directory my_progs , my_basic_progs

  mv my_progs my_basic_progs 
Untitled Document