[Programming] Linux entry: grep -v command

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

  1. Filter content in text
  2. Combine ps -ef to view the process
  3. Filter the contents of a folder
    Example:
    Insert picture description here

Guess you like

Origin blog.csdn.net/m0_46613023/article/details/114728267