filter_out_unwanted_interfaces_using_grep
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
filter_out_unwanted_interfaces_using_grep [2023/11/09 22:59] – walkeradmin | filter_out_unwanted_interfaces_using_grep [2023/11/09 23:07] (current) – walkeradmin | ||
---|---|---|---|
Line 8: | Line 8: | ||
\\ | \\ | ||
\\ | \\ | ||
- | For example, if we do an 'ip -br -c a' we can get quite a list: | + | For example, if we do an '<color #ed1c24>ip -br -c a</ |
- | \\ | + | |
\\ | \\ | ||
< | < | ||
Line 66: | Line 65: | ||
veth0f16c600@if2 UP | veth0f16c600@if2 UP | ||
</ | </ | ||
+ | This may or may not be an issue, but sometimes this long list means the interfaces you are interested in will scroll off the top of the page. You could use something like head: | ||
+ | \\ | ||
+ | \\ | ||
+ | <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | This will give an output similar to: | ||
+ | < | ||
+ | lo | ||
+ | eno1 | ||
+ | eno2 | ||
+ | eno3 | ||
+ | eno4 DOWN | ||
+ | internalk3s0 | ||
+ | kube-ipvs0 | ||
+ | flannel.1 | ||
+ | cni0 | ||
+ | veth3d27dfa7@if2 UP | ||
+ | </ | ||
+ | \\ | ||
+ | However, we can use GREP to filter out the unwanted entries, in this example the biggest number of unwanted entries are the ' | ||
+ | \\ | ||
+ | \\ | ||
+ | <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | lo | ||
+ | eno1 | ||
+ | eno2 | ||
+ | eno3 | ||
+ | eno4 DOWN | ||
+ | internalk3s0 | ||
+ | kube-ipvs0 | ||
+ | flannel.1 | ||
+ | cni0 | ||
+ | </ | ||
+ | \\ | ||
+ | If we wish to go further, we can filter out the kube/ | ||
+ | \\ | ||
+ | \\ | ||
+ | <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | This will give us a list of just the physical interfaces: | ||
+ | \\ | ||
+ | < | ||
+ | lo | ||
+ | eno1 | ||
+ | eno2 | ||
+ | eno3 | ||
+ | eno4 DOWN | ||
+ | </ | ||
+ | \\ | ||
+ | \\ |
filter_out_unwanted_interfaces_using_grep.1699570766.txt.gz · Last modified: 2023/11/09 22:59 by walkeradmin