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 :)


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -