1、查看多少个用户
cat /etc/passwd|grep /home
2、查看ntsysv指令有没安装,安装了在哪个目录
find / -name "ntsysv" -print
3、解压gz文件:tar -zxvf /tmp/etc.tar.gz
4、重启PHP服务 service httpd restart
5、修改为只读:chmod u-w license.key
5、修改为可写:chmod u+w license.key
6、清空iptables:
a、进入iptables目录:cd /etc/sysconfig
b、iptabels备份:cp iptables iptables20110507
C、iptables清空:vi iptables (使用“DD”删除,然后按“:wq”保存退出)
7、iptables停止: /etc/init.d/iptables stop (停止了如果重启linux这个服务会自动开启)
8、iptables重启: /etc/init.d/iptables restart
9、ssh重启: /etc/init.d/sshd restart
10、httpd 重启: /etc/init.d/httpd restart (apache服务) 解压tar: tar -xvf test20110930.tar (解压tar包)
(如 grep -c hello aa.txt,查看aa.txt中出现多少个hello单词)
14、linux 在vi中前面加数字编号
vi txt.ini 后,按“Esc”键,然后输入“:”,再输入“set number”。
cut -b 1-5 filename (输入文件filename中每行第1到5个字符)
file filename
sort filename (如filename中三行分别为bb、aa、cc,使用命令后变成aa、bb、cc)
cat /etc/passwd|grep
2、查看ntsysv指令有没安装,安装了在哪个目录
3、解压gz文件:tar -zxvf /tmp/etc.tar.gz
4、重启PHP服务 service httpd restart
5、修改为只读:chmod u-w license.key
5、修改为可写:chmod u+w license.key
6、清空iptables:
7、iptables停止: /etc/init.d/iptables stop (停止了如果重启linux这个服务会自动开启)
8、iptables重启: /etc/init.d/iptables restart
9、ssh重启:
10、httpd 重启: /etc/init.d/httpd restart (apache服务)
11、查看linux是不是64位:getconf WORD_BIT
12、压缩tar: tar -cvf test20110930.tar test(将当前的test目录下打包成test20110930.tar)
12、压缩tar:
13、查看文件中出现某个单词的次数:grep -c hello 文件名
14、linux 在vi中前面加数字编号
15、输入一个文件中每一行的从第N个字符到第M个字符
16、查询文件的类型
17、对文件中的每一行按照第一个字母进行排序