Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux command to move a directory into another directory

I have a directory dir1 and it contains a lot of files and directories and also I have another directory dir2 and it is empty. And I need a linux command to move the dir1 with all the files and folders into dir2. The result should be like that dir2/dir1/...

I found the mv command, but it moves a file from a directory to another directory and I don't want that. Thank you!

like image 349
elvis Avatar asked May 13 '26 13:05

elvis


1 Answers

mv command can move directories also.

like image 146
Dhruv Avatar answered May 15 '26 10:05

Dhruv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!