- 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.
本文介绍了Linux系统中常用的几个命令,包括grep用于搜索文件内容,find用于查找文件,echo用于显示变量值,readonly用于设置只读变量,以及export用于设置全局变量。通过这些命令的学习,可以更好地掌握Linux系统的操作。
632

被折叠的 条评论
为什么被折叠?



