filter_out_unwanted_interfaces_using_grep
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
filter_out_unwanted_interfaces_using_grep [2023/11/09 22:55] – created walkeradmin | filter_out_unwanted_interfaces_using_grep [2023/11/09 23:07] (current) – walkeradmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Filter Out Unwanted Interfaces Using Grep | + | ====== |
+ | <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | When using Linux with Docker/ | ||
+ | \\ | ||
+ | \\ | ||
+ | For example, if we do an '< | ||
+ | \\ | ||
+ | < | ||
+ | lo | ||
+ | eno1 | ||
+ | eno2 | ||
+ | eno3 | ||
+ | eno4 | ||
+ | internalk3s0 | ||
+ | kube-ipvs0 | ||
+ | flannel.1 | ||
+ | cni0 | ||
+ | veth3d27dfa7@if2 UP | ||
+ | vethb0a17eb4@if2 UP | ||
+ | veth619f3a08@if2 UP | ||
+ | veth0977d0fb@if2 UP | ||
+ | vethe60bc71c@if2 UP | ||
+ | veth8a69f3b6@if2 UP | ||
+ | veth1437d366@if2 UP | ||
+ | veth3a247e74@if2 UP | ||
+ | vethc8654bec@if2 UP | ||
+ | veth62cbba67@if2 UP | ||
+ | vethfd3f5763@if2 UP | ||
+ | vethdd5adce6@if2 UP | ||
+ | veth567a8f8d@if2 UP | ||
+ | veth0b064639@if2 UP | ||
+ | vethdeed99b2@if2 UP | ||
+ | veth04829d3b@if2 UP | ||
+ | veth6660a31c@if2 UP | ||
+ | veth2c06a596@if2 UP | ||
+ | veth99db8892@if2 UP | ||
+ | veth47ce8ea5@if2 UP | ||
+ | veth976d6e7f@if2 UP | ||
+ | vethe4ae5d10@if2 UP | ||
+ | veth6c7cd23e@if2 UP | ||
+ | veth71d280a4@if2 UP | ||
+ | vethd227b1f6@if2 UP | ||
+ | veth55a1c60b@if2 UP | ||
+ | vethbc6f5ccc@if2 UP | ||
+ | vethc25d04a7@if2 UP | ||
+ | veth93d06e97@if2 UP | ||
+ | veth2641a619@if2 UP | ||
+ | veth284b1fa0@if2 UP | ||
+ | vethe1fdb3e7@if2 UP | ||
+ | veth905c6a4e@if2 UP | ||
+ | vethd1853059@if2 UP | ||
+ | veth0a79a49b@if2 UP | ||
+ | veth48b4b040@if2 UP | ||
+ | veth1ac96caa@if2 UP | ||
+ | veth3f9ad283@if2 UP | ||
+ | vethef6fb521@if2 UP | ||
+ | vethaacee777@if2 UP | ||
+ | vetha6ac44b4@if2 UP | ||
+ | veth05123eed@if2 UP | ||
+ | veth91566343@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 | ||
+ | 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 | ||
+ | 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 | ||
+ | </ | ||
+ | \\ | ||
+ | \\ |
filter_out_unwanted_interfaces_using_grep.1699570536.txt.gz · Last modified: 2023/11/09 22:55 by walkeradmin