
linux
文章平均质量分 60
fly__ing
这个作者很懒,什么都没留下…
展开
-
linux----快速定位日志
快速定位日志1、定位错误关键字所在行数cat -n test.log |grep “查找的错误关键字”2、得到错误关键字所在行号(假设为第500行),查询错误关键字前后100行数据cat -n test.log |tail -n +400|head -n 200(表示从第400行开始往后查询200行数据)...转载 2021-09-26 15:03:10 · 1800 阅读 · 0 评论 -
Linux---tar相关命令
Linux—tar相关命令格式:tar zcvf 压缩后的路径及包名 你要压缩的文件z:gzip压缩c:创建压缩包v:显示打包压缩解压过程f:接着压缩t:查看压缩包内容x:解压X:指定文件列表形式排除不需要打包压缩的文件或目录-exclude:指定排除文件或目录不需要打包压缩的文件或目录(也可以用正则匹配/通配符等)-C:解压到指定目录例如:将/root/cs/test/下文件压缩到/root/cs/test1文件下命名为1tar zcf /root/cs/test1/1.tar.g转载 2021-03-11 09:32:30 · 350 阅读 · 0 评论 -
Linux---linux修改配置 /etc/profile
Linux—linux修改配置Linux系统中修改/etc/profile文件的方法etc/profile文件是只读的,直接用vi或gedit打开修改后是无法保存的。要修改profile,需要取得root权限,(使用gedit编辑)sudogedit/etc/profile 或者 sudo gedit /etc/profile 或者 sudogedit/etc/profile 或者 sudo -s $gedit /etc/profile 这样打开profile文件,修改后就可以转载 2020-05-26 16:51:47 · 11992 阅读 · 0 评论