防火墙问题
重启后永久性生效
- 开启:
chkconfig iptables on
- 关闭:
chkconfig iptables off
即时生效
- 开启:
service iptables start
- 关闭:
service iptables stop
解压
tar –xvf file.tar
//解压 tar包tar -xzvf file.tar.gz
//解压tar.gztar -xjvf file.tar.bz2
//解压 tar.bz2tar –xZvf file.tar.Z
//解压tar.Zunrar e file.rar
//解压rarunzip file.zip
//解压zip
查询并删除
find /data/xxx/ -name spring-2.5.6.SEC03.jar | xargs rm -rf
清除10天以上的日志
find /data/program/nginx/logs/ -type f -atime +10 | xargs rm -rf
第3000行开始,显示1000行。即显示3000~3999行
cat filename | tail -n +3000 | head -n 1000
显示1000行到3000行
cat filename| head -n 3000 | tail -n +1000
用sed命令
sed -n '5,10p' filename
这样你就可以只查看文件的第5行到第10行。
查看某一进程产生的线程数
ps hH p 3531 |wc -l
把文件夹权限授权给别的用户
chown -R username:groupname /data/*
未完待续

相关推荐
版权声明
- 本文链接: https://www.cayzlh.com/2017/04/12/f42d2759.html
- 版权声明: 文章内容仅用作学习和分享,如有雷同,纯属拷贝。
留言区