Shell常用操作

发布时间:2024年01月22日

Shell常用操作

1.查看端口

  1. 查看端口是否开放
    #查看开放端口

    lsof -i:端口号
    

2.磁盘挂载

#磁盘挂载

  1. 查看没有挂载的磁盘

    # 查看当前挂载的目录
    [root@fraud-site-spider-1 ~]# df -TH
    Filesystem     Type      Size  Used Avail Use% Mounted on
    devtmpfs       devtmpfs  8.3G     0  8.3G   0% /dev
    tmpfs          tmpfs     8.4G  4.1k  8.4G   1% /dev/shm
    tmpfs          tmpfs     8.4G   19M  8.3G   1% /run
    tmpfs          tmpfs     8.4G     0  8.4G   0% /sys/fs/cgroup
    /dev/sda1      xfs        33G   21G   13G  63% /
    tmpfs          tmpfs     1.7G     0  1.7G   0% /run/user/0
    /dev/sdb       ext4      106G   57G   44G  57% /home
    /dev/sdc       ext4      529G  484G   18G  97% /tmp_data
    # 查看磁盘
    [root@fraud-site-spider-1 ~]# fdisk -l
    
    Disk /dev/sdc: 536.9 GB, 536870912000 bytes, 1048576000 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size 
文章来源:https://blog.csdn.net/weixin_44331765/article/details/135745706
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。