I'd like to be able to do the following in the search box:

shell [cmd] [-linux]

to search for "questions containing the 'shell' term AND having the 'cmd' tag AND NOT having the 'linux' tag"

Note that "shell" is not a TAG !


You can if you precede the tag in the search with a minus (-):

shell [cmd] -[linux]

The following links pop for searches across the SOFU for questions that mention shell tagged but not tagged .

StackOverflow: https://stackoverflow.com/search?q=shell+%5Bcmd%5D+-%5Blinux%5D

ServerFault: https://serverfault.com/search?q=shell+%5Bcmd%5D+-%5Blinux%5D

SuperUser: https://superuser.com/search?q=shell+%5Bcmd%5D+-%5Blinux%5D

  • I think the minus sign should be outside the brackets, Is it right? I tried and it is the solution. OK – drAlberT Aug 26 '09 at 14:01
  • Logically it would be on the outside, but within the brackets, it keeps that part of the query as a tag. – random Aug 26 '09 at 14:09

As workaround you can set linux to your ignore list temporarily (or permanently, if you don't like it at all).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .