remove all folder except a folder bash code example Example: bash delete everything except $ rm -v !("filename1"|"filename2")