zoukankan      html  css  js  c++  java
  • usb禁用验证

    usb禁用验证

    执行命令

    mv /tmp/usb-storage.ko ./

    insmod ./usb-storage.ko

    sleep 1

    fdisk -l | grep 15.5

    sleep 1

    lsmod | grep usb

    sh /tmp/usb.sh

    sleep 1

    fdisk -l | grep 15.5

    sleep 1

    lsmod | grep usb

    exit

    现在usb-storage.ko位置是

    [root@logs10 ~]# ls /root/usb-storage.ko

    /root/usb-storage.ko

    脚本:

    [root@UDPI01 ~]# cat usb.sh
    #!/bin/bash
    rmmod usb-storage
    mv /lib/modules/`uname -r`/kernel/drivers/usb/storage/usb-storage.ko /tmp/

    恢复命令如下:

    [root@ruancai15 storage]# mv /tmp/usb-storage.ko ./
    [root@ruancai15 storage]# insmod ./usb-storage.ko
    [root@ruancai15 storage]# lsmod | grep usb
    usb_storage            49452  0
    [root@ruancai15 storage]# fdisk -l

    Disk /dev/sda: 1798.7 GB, 1798651772928 bytes
    255 heads, 63 sectors/track, 218673 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x55f098cb

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          64      512000   83  Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2              64      201846  1620814848   83  Linux
    Partition 2 does not end on cylinder boundary.
    /dev/sda3          201846      208221    51200000   83  Linux
    Partition 3 does not end on cylinder boundary.
    /dev/sda4          208221      218674    83968000    5  Extended
    Partition 4 does not end on cylinder boundary.
    /dev/sda5          208221      214595    51200000   83  Linux
    /dev/sda6          214595      218674    32765952   82  Linux swap / Solaris

    Disk /dev/sdb: 7784 MB, 7784628224 bytes
    88 heads, 24 sectors/track, 7199 cylinders
    Units = cylinders of 2112 * 512 = 1081344 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x04030201

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               2        7200     7600596    b  W95 FAT32
    [root@ruancai15 storage]#

  • 相关阅读:
    Spring的IOC原理(转载)
    谈谈对Spring IOC的理解
    Servlet3.0学习总结(四)——使用注解标注监听器(Listener)
    Servlet3.0学习总结(三)——基于Servlet3.0的文件上传
    Servlet3.0学习总结(二)——使用注解标注过滤器(Filter)
    Servlet3.0学习总结(一)——使用注解标注Servlet
    XML学习总结(二)——XML入门
    XML学习总结(一)——XML介绍
    孤傲苍狼的博客园
    android 布局之滑动探究 scrollTo 和 scrollBy 方法使用说明
  • 原文地址:https://www.cnblogs.com/idvcn/p/9067557.html
Copyright © 2011-2022 走看看