常见问答整理

1.
linux启动过程
int进程linux第一启动进程
读取/etc/inittab 配置文件
初始化系统 设置主机名 ip地址等
根据启动级别启动软件
登录界面
2.负载
w
utime
top
free -h
3.awk 和sed区别

awk 擅长取列 默认正则
sed 擅长取行 -r 支持正则

grep 过滤行 egrep 支持正则-o 只显示匹配的字符

4.查看主机配置
lscpu
cat /proc/cpuinfo
cat /proc/meminfo

5.统计目录大小
du -sh /*
修改文件打开最大数
待补充

日志默认文件位置
/var/log/message
6.http
404 no find

7.路由器
华为
8.mysql的端口 ssh
3306 22

9.在11月分内 每天的早上6点到12点 每隔2个小时执行
/usr/bin/httpd.sh

00 06,08,10,12 * 11 * /bin/sh /usr/bin/httpd.sh
10.查找大于100k的文件

find /usr/local/test-type f -size +100k |xargs mv -t /tmp

find /usr/local/test -type f -size +100k -exec mv {} /tmp\

mv $(find /usr/local/test -type f -size +100k) /tmp

11.查看进程1022端口

netstat -anput | grep 10022

12 运维工程师的工作认识

数据安全
网站7*24
提升用户体验

13.查看某个文件下的目录数
[root@node62 ~]# find / -type d -maxdepth 1 |wc -l

[root@node62 ~]# tree -Ld 1 /

14
umask 022
最大权限减去022是文件的默认权限
15.排除a打包
tar czf /tmp/test.tar.gz /test --exclude=/test/a

16.进程打开的文件
[root@node62 ~]# lsof |grep sshd

17,查看rpm内的文件

rpm -ql test.rpm

18.软连接
mkdir /test/{a,b}
ln -vs /test/a /test/b

19.第一变量生效
[root@node62 ~]# test=2
[root@node62 ~]# echo test
test
[root@node62 ~]# echo $test
2

20.开机启动

vim /etc/init.d/testd
# chkconfig: 2345 99 99
hostanme

chkconfig --add testd
chkconfig testd on
chkconfig --list

21.shell下的命令
/usr/bin
/bin

22. ip 获取

[root@node62 ~]# ifconfig ens192 |sed -n '2p'|awk '{print $ 2}'

57分钟

猜你喜欢

转载自www.cnblogs.com/zsl-find/p/10245875.html