I have created a folder (directory) named Parent
which contains several files (namely file1
file2
… file100
) and subdirectories (Folder2
, Folder3
etc) and a particular sub-directory named Child1
which itself may contain files and folders.
Now, I want to copy all the contents of Parent
excluding Child1
into the folder Child1
.
The final content of 'Child1' should be something like this:
Old content of Child1
file1 ... file100 + Folder2 Folder3 + etc.
How can I achieve this?
Best Answer
Assuming you are using bash as your interactive shell, you can enable extglob which allows you to specify "all files except these ones".