Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

ubuntu remove all folders but keep some

find ./myfolder -mindepth 1 ! -regex '^./myfolder/test2(/.*)?' -delete
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #ubuntu #remove #folders
ADD COMMENT
Topic
Name
2+7 =