day02-02-查看文件内容--系统服务管理-系统启动规划

*********拷贝文件
cp somefile.txt /home/hadoop

**********查看文件内容
cat somefile 一次性把文件内容全部输出到控制台
more somefile 可以翻页查看 下翻页(空格),上翻页b 退出q
less somefile 可以翻页查看 下翻页(空格),上翻页b

tail -10 install.log 可以查看文件尾部10行
tail -f install.log 小f 按照文件内部的行号跟踪
tail -F install.log 大F 按照文件名称来跟踪

head -10 install.log 可以查看文件头部10行

***********后台服务管理
service network status 查看指定服务的状态
service network stop 停止指定服务
service network start 启动指定服务
service network restart 重启指定服务
service --status-all 查看系统中所有的后台服务

***********查看后台服务的自己启动配置
chkconfig 查看自动启动的配置
chkconfig iptables off 关闭指定服务的自动启动
chkconfig iptables on 开启指定服务的自动启动

***********系统启动级别管理
vi /etc/inittab
# 0 - halt (Do NOT set initdefault to this)
#  1 - Single user mode
#  2 - Multiuser, without NFS (The same as 3, if you do not havenetworking)
#  3 - Full multiuser mode
#  4 - unused
#  5 - X11
#  6 - reboot (Do NOT set initdefault to this)

posted @ 2018-03-03 17:16  s1332177151  阅读(76)  评论(0)    收藏  举报