ubuntu command line delete all folders except one in linux code example
Example 1: delete all the files without one in linux
# delete all except the filename
$ rm -v !("filename")
Example 2: ubuntu remove all except
$ rm -v !("filename")
# delete all except the filename
$ rm -v !("filename")
$ rm -v !("filename")