ubuntu - Linux how to use rm and exclude switch -
i wondering how can use linux rm command --exclude switch?
for example grep has exclude function when searching on files.
here 1 specific
rm `find . -name "safe_room*" ! -name "safe_rooms.php"`
i used git
git rm `find . -name "safe_room*" ! -name "safe_rooms.php"`
explanation:
rm - linux command delete
`` - signs used within mysql. on keyboard ctrl + 7
find . -name "safe_room*" - find safe_room*
! - not logical operator
-name "safe_rooms.php" - exclude except safe_rooms.php
hope :)