Home » linux » Linux and Unix mv command tutorial with examples

Linux and Unix mv command tutorial with examples

“mv” command is used to moves a group of file to a another/different directory.
“mv” command can also use to rename file and directory. This command does not create a new copy of file , it only rename it. When we rename it does not consume any additional space on the disk.

Syntax:

Example :

Rename File:
Suppose we want to rename a file Mybook01 to MyNotes01 than command is as follows:

Rename Directory:
Suppose we want to rename a directory dir01 to Mydir01 than command is as follows:

Move Number Of Files To a Directory

Suppose we want to move three files Mybook01 , MyBook02 & MyBook03 into a directory dir01 than command is as follows:

Above command moves three files Mybook01 , MyBook02 & MyBook03 into a directory dir01.

Please follow and like us:
error