Listing rules

Listing rules

Sometimes, it can be useful to know whether a domain is blocked, allowed, redirected, or if the rule doesn't exist. You may also want to know which rules a specific filter list contains. You can list all rules present in TBlock's database:

tblock -l

Or the long operation:

tblock --list-rules

Listing user rules only

It is important to see which rules are user rules and which ones aren't, because user rules have a higher priority than other rules. To list all user rules:

tblock -le

The long version:

tblock --list-rules --user

Listing non-user rules only

You can also list all rules that are set by filter lists, but exclude user rules from them:

tblock -lt

Or:

tblock --list-rules --standard

Listing rules from specific filter lists only

You can also list the rules from a specific filter list only (or several). Here we'll assume that you want to list the rules from easylist and easyprivacy:

tblock -lm easylist easyprivacy

With the long version:

tblock --list-rules --from-filters easylist easyprivacy