linux基础
linux基础
linxu关键字:
1. grep命令:
grep(global regular expression print)命令是一种强大的文本搜索工具,他能使用正则表达式搜索文本,并把匹配的行打印出来。
命令格式 grep [option] pattern files
使用示例
1. 查看指定进程 `ps -ef|grep svn`
2. 查看进程个数 `ps -ef|grep svn -c`
3. 文件中读取关键词进行搜索 `cat test.txt | grep -f test2.txt` //输出test.txt文件中含有从test2.txt文件中读取出的关键词的内容行,并显示每一行的行号- 在文件中查找关键字
grep 'linux' test.txt - 找到以u开头的内容
cat test.txt |grep ^u
2. Q:linux 中的文件/目录权限设置命令
A : chmod
linux多线程与多进程通信
参考网址:
- https://songlee24.github.io/2015/04/21/linux-IPC/
- https://blog.csdn.net/gatieme/article/details/50908749
- https://www.cnblogs.com/LUO77/p/5816326.html