my linux command tips

  1. grep

grep <expression> <path>

grep '^public' /etc/passwd #search line begin with public in '/etc/passwd'

grep options:

-E enable extends pattern

-i case insensitive

-n show line number

2.  find

find <path> <expressions>:default path . default expressions-print

expression: e1 -a e2:parse e2 only when e1 is true.same as e1 e2

e1,21:parse e1 and e2.

find expresssions:-group -type -user -exec cmd

3.echo

echo ${var}char:display value of var and flow with char.

4 readonly var:make the value of the var is read only.

5 export

global variable set.

相关推荐