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}? – Drav Sloan Aug 15 '13 at 20:40bashdoesn't include '.' folders in pathname expansion. Which may or may not be desired. Myself I doshopt -s dotglobin.bashrcto fix that. Just a side note that somebody might find useful ;). – Miroslav Koškár Aug 15 '13 at 20:58