For files:
find . ! -name 'file.txt' -type f -exec rm -f {} +
For directories:
find . ! -name 'directory' -type d -exec rm -rf {} +
For files:
find . ! -name 'file.txt' -type f -exec rm -f {} +
For directories:
find . ! -name 'directory' -type d -exec rm -rf {} +
0 comments:
Post a Comment