0% found this document useful (0 votes)
63 views1 page

Day - 3 Basic Commands4

To move or rename a file or directory in Linux, use the mv command followed by the source path and destination path. For moving, the destination path specifies a new location, while renaming keeps the file in the same location but with a different name.

Uploaded by

Deepak
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views1 page

Day - 3 Basic Commands4

To move or rename a file or directory in Linux, use the mv command followed by the source path and destination path. For moving, the destination path specifies a new location, while renaming keeps the file in the same location but with a different name.

Uploaded by

Deepak
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Moving / Renaming a File or Directory

To
Tomove
moveaafile/dir
file/dirto
toaadifferent
different location
location
[root@comp1
[root@comp1 ~]# mv <source path> <destination
~]# mv <source path> <destinationpath>
path>

To
To rename
rename file/dir
file/dirmove
moveat
atsame
samelocation
location
[root@comp1
[root@comp1~]#
~]#mvmv <old
<oldname>
name><new
<newname>
name>

You might also like