跳至主要內容

02.linux基础命令

约 161 字小于 1 分钟

命令结构

命令 [ -选项 ] [ 参数 ]

ls ll 命令


############   查看文件
cat 

tac

tail -f  xxx.txt

more xxx.txt

less xxx.txt


######################   搜索文件

find [搜索范围] [匹配条件]

find /etc -name *xxxx.init
find /etc -iname *xxx.init
find /etc -size +204800
find /etc -user root





######################   权限
所有者、所处组、其它人

chown 所有者  文件
chown root  xxx.txt

chgrp 所处组 xxx.txt
chgrp root  xxx.txt



修改权限
chmod 777 xxx.txt

r   4
w   2
x   1



####################  网络
last  查看所有登录用户信息


查看数据包经过的节点
traceroute  baidu.com


netstat

-t   tcp协议
-u   udp协议
-l   监听
-r   路由
-n   显示ip和端口号

netstat -tlun
netstat -an
netstat -rn





iftop