grep -v command
Among shell commands, the grep command is a search command for text lines. grep -v is a reverse text line search. When there is a lot of console output, and there are many things we don't want to see, we can use the grep -v command.
- grep name: Indicates that only the content of name is viewed
- grep -v name: Indicates to view content other than name
Combined with the pipeline operator |, grep -v can be used in
- Filter content in text
- Combine ps -ef to view the process
- Filter the contents of a folder
Example: