Move / Rename File in Linux

Move



The mv command renames files in the same directory, or relocates files to a new directory. File content remain unchanged. File moved to a different file system require creating a new file by coping the source file, then deleting the source file. Although normally transparent to the user, large files may take noticeably longer to move.

Move / Rename File in Linux


The first mv command is an example of renaming a file.
[root@CentOs Chapter1]# mv VideoFile1.mov VideoFile1-Final.mov
The second causes the file to be relocated to another directory.
[root@CentOs Chapter1]# mv VideoFile2.mov /root/TV/Chapter2/

For More Details See Man Page


Tech info

Comments