For this type of dir structure :
/config/filegroups/filegroupA/files/fileA1.txt
/config/filegroups/filegroupA/files/fileA2.txt
/config/filegroups/filegroupB/files/fileB1.txt
/config/filegroups/filegroupB/files/fileB2.txt
...
I know that I can use rm -rf /config/filesgroups
to delete parent folder and all sub-folders ...
but I want to delete only /filegroupA
, /filegroupB
, etc. , and not delete /config/filegroups
rm -rf /config/filegroups/filegroups{A,B}
?bash
doesn't include '.' folders in pathname expansion. Which may or may not be desired. Myself I doshopt -s dotglob
in.bashrc
to fix that. Just a side note that somebody might find useful ;).