linux简单命令常用随记

 1 //查看网络信息
 2 ifconfig
 3 
 4 //修改ip地址
 5 ifconfig eth0 123.123.123.123 netmask 255.255.255.0
 6 //网关设置
 7 route add default gw 123.123.123.1 
 8  
 9 //服务开启、重启、停止
10 service mysql/httpd/named/...  start/restart/stop
11 
12 ls -l //long format
13 ls -i //inode
14 ls -t //sorted by time
15 ls -h //human readable K M G
16 ls -a //show file like .XXX 
17 
18 touch newfile //新建文件
19 vi newfile       i--insert   Esc退出 :wq保存退出
20 cat newfile
21 cp mv rm……
22 ln newfile newfilelink //hard-link    -s 符号链接
23 
24 chmod 754 newfile //权限 包括rwx 读写执行 root group other
25 
26 echo  eg. echo “something in file”>fille.txt   echo “This file's contents”>>fille.txt
27 重定向  >   >>
28 nslookup
29 ping
30 管道 | 
31 ps

如下模式要搞搞清楚,先记下来:

有道词典
重定向 > >>
详细 X
Redirect > > >

猜你喜欢

转载自www.cnblogs.com/wangc034/p/9264599.html
今日推荐