Linux mv Command Tutorial with Examples To Move Files – POFTUT

Linux mv Command Tutorial with Examples To Move Files

Linux mv command is used to move or rename files. We generally provide the source and destination files and directories to mv command.



The regular usage of mv command is moving files or directories. We will provide source files or directory and destination file or directory. In this example we will move or rename directory named backup into live .


If there is files and folders in  the destination the mv command will stop moving. We can force move operation with -f option.

Ask Before Overwrite

We can prompt before overwriting destination file. We will use -i option for this. In order to accept overwrite we should answer with y or Y .


While moving files we may need to list all moved files. We call this verbose mode. This will list moved files line by line with -v option like below.

LEARN MORE  How To Scan Wordpress Sites With Wpscan (Tutorial) For Security Vulnerabilities?

Leave a Reply

Your email address will not be published. Required fields are marked *