find
[范围] 如果不加, 指定当前目录为查找范围
- -name "xxxx" #名字可以支持文件符号匹配
- *(表示任意长度的任意字符)
- -type d f s c b l p
- -mtime
- -size
-nouser 没有属主
-nogroup 没有属组
- -prome #指定权限过滤
- !
- |xargs / -ok / -exec
例子: find -name "xen-netfront.ko" -exec mv {} xen.ko \;
stat
查看三个时间
- atime ctime mtime(ll)
- touch
创建新文件
如果文件已存在, 就更新 mtime 为当前
top
动态查看当前系统的资源使用情况
- xl top <domname/domid>
- setenforce 0
临时关闭 selinux
getenforce
查看 selinux 的当前状态
- /etc/selinux/config #永久修改
- ifconfig
查看网卡 (都是 up 的)
- ifconfig -a (所有的网卡, 包括 down 的)
- ifconfig br0 up
- ifup eno16777736
- ifconfig <dev> IP/MASK [up|down]
- fdisk
-l 查看本地磁盘分区情况
fdisk [磁盘文件] #对该磁盘做分区
- n p 1 +200M
- n p 2 +1024M
- w q p t L
- Base-T-1000 -- e1000
磁盘 Linux 下命名:
- sd iscsi sata scsi
- sda
- sda1
- sda2
- sdb
hd IDE 接口
- hda
- hda1
- hda2
- hdb
- rpm
红帽的包管理工具
- -ivh #数据包的安装
- -qa #查看这个包是否安装
- -ql #查看这个包到底安装了那些内容
- sync
partprobe(5),partx(6) -- CPU 内存识别硬盘设备的变更
- kpartx,sync
- esc + . #直接调用上一条命令的最后一个内容
- cd /etc/sysconf/network-scripts/
- ~]#cd
- ss -tnl #显示系统监听的套接字端口
来源: http://www.bubuko.com/infodetail-3059414.html