André Amorim

Crafting Web Experiences

//

Bash Delete files with Exceptions

find . ( 
! -path '.' 
! -iname '.env' 

! -path './config' 

! -path './logs' 
! -path './logs/*' 

) -delete 

Delete except a file:

find . ( 
! -path '.' 
! -iname 'index.php' 
) -delete

Published date:

Modified date: