Quick Answer: How Do I Copy a Folder Except One in Linux?
Contents We Can Also Use Cp Command to Copy Folders from One Location to Another Excluding Specific Directories. Go Your Source Directory I. E Ostechnix in Our...
We can also use cp command to copy folders from one location to another excluding specific directories. Go your source directory i.e ostechnix in our case. The above command will copy all contents of the current folder ostechnix except the sub-directory dir2 and saves them to /home/sk/backup/ directory.
How do I copy all files except one in Linux?
The best and simple way is using find . Go to the source directory. Then use the following commands. This copies all files except “*.
Must Read
How copy and exclude files in Linux?
Type cp * , hit Ctrl X * and just see what happens. This assumes the target directory structure being the same as the source’s. It’s relative to the source directory. This will exclude the directory source/.