How to move all files and folders from one directory to another directory in Linux

Execute this command in your Linux terminal (Change the directory path): This command will move all the files and folders from directory1 folder to directory2 folder. To move all files, but not folders: If you are interested in moving all files (but not folders) from directory1 folder to directory2 folder, use this command To move only files from the directory1 folders, but not from sub-folders: If you want to move all files from the directory1 folder, but not any files within folders in the directory1 folder, use this command: here, -maxdepth option specifies how deep find should try, 1 means, only the directory specified in the find command. You can try using 2, 3 also to test.

How to move all files and folders from one directory to another directory in Linux Read More ยป