Quantcast
Viewing latest article 1
Browse Latest Browse All 2

Answer by steeldriver for How to find multiple files with specific pattern using or in find command

You can use

! \( -name '.bashrc' -o -name '.profile' \)

Ex.

$ find /etc/skel ! \( -name '.bashrc' -o -name '.profile' \)
/etc/skel
/etc/skel/.mkshrc
/etc/skel/examples.desktop
/etc/skel/.kshrc
/etc/skel/.bash_logout

The quotes aren't actually necessary in this case but you should get in the habit of using them in the case that the search pattern contains glob characters.


Viewing latest article 1
Browse Latest Browse All 2

Trending Articles