HowTo: Move A Folder In Linux Using mv Command

I have downloaded bootstrap for a project, but, by mistake, I had unzipped the bootstrap archive in the root folder instead of html folder. Now I have to delete the folder and unzip again the archive to the correct folder or just move the folder. I’ll choose to move files because it seems the sane thing to do.

So? How to move a folder in Linux?

It is very simple, just use mv command, like this:

$mv source_folder target_folder

$mv /path/of/source /path/to/destination

<br>Now in my case, that will be:

$mv bootstrap/bootstrap-4.5.3-dist/ /var/www/html/airplane/bootstrap

Here bootstrap/bootstrap-4.5.3-dist/ is the source and /var/www/html/airplane/bootstrap is final destination. This will move the content of bootstrap/bootstrap-4.5.3-dist/ to our destination.


Hope it’s useful to somebody!

Be the first to comment

Leave a Reply