If you have a list of directories out of which you have to delete all except one, you can use the following command:
rm -rf !("do_not_delete_this_directory")
However, for this to work, you first need to run this:
If you have a list of directories out of which you have to delete all except one, you can use the following command:
rm -rf !("do_not_delete_this_directory")
However, for this to work, you first need to run this: