linux命令练习
- 重启linux系统:#rboot
- 删除光标前后的内容:前 CTRL+U 后 CTRL+K
- 删除/tmp下所有A开头的文件:#rm -f /tmp/A*
- 把/etc/passwd文件备份到/tmp文件下:#cp /etc/passwd /tmp/passwd
- 查看系统中最后创建的三个用户:#tail -3 /etc/passwd
- 统计当前系统的账户:#wc -l /etc/passwd 或者 #cat /etc/passwd |wc -l
- 创建/tmp/test.conf文件:#touch /temp/test.conf
- 打开上行的文件:#vim /temp/test.conf
- 查看/etc/passwd前三行,后三行:前 #head -3 /etc/passwd 后 #tail -3 /etc/passwd
- 一次性创建目录 /text/1/2/3:#mkdir -p /text/1/2/3
- 返回家目录:# cd ~ 或者 #cd
- 查看/etc磁盘空间:#du -sh
- 删除/tmp下所有文件:#rm -rf /tmp/*
- 启动Apache服务,检查是否启动:#servce httped start #ps -ef|grep httped
- 杀死Apache进程:#killall httped