已經掛載好的分割槽可以通過df -h來檢視,連線的裝置可以通過fdisk -l來檢視。比如:
root@openwrt:~# fdisk -l
disk /dev/mtdblock0: 192 kib, 196608 bytes, 384 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/mtdblock1: 64 kib, 65536 bytes, 128 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/mtdblock2: 64 kib, 65536 bytes, 128 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/mtdblock3: 15.7 mib, 16449536 bytes, 32128 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/mtdblock4: 14.7 mib, 15419904 bytes, 30117 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/mtdblock5: 4.6 mib, 4784128 bytes, 9344 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: 15.5 gib, 16634675200 bytes, 32489600 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
disklabel type: dos
disk identifier: 0x017e1ea1
device boot start end blocks id system
/dev/sda1 * 64 32489599 16244768 b w95 fat32
disk /dev/sdb: 12 mib, 12517376 bytes, 24448 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
disklabel type: dos
disk identifier: 0x00000000
device boot start end blocks id system
/dev/sdb1 64 24447 12192 4 fat16 <32m
u盤就是其中的/dev/sda1 和/dev/sdb1 兩個分割槽。把打的15g的分割槽掛在上,可以通過mount /dev/sda1 /mnt/udisk來掛在到目錄下
自動掛載,可以通過兩種方式:
1.直接修改/etc/config/fstab,新增:
config 'mount'
option 'device' '/dev/sda1'
option 'options' 'rw,sync'
option 'enabled_fsck' '0'
option 'enabled' '1'
option 'target' '/mnt/udsik'
整合測試 固定裝置多於自動裝置
目錄介紹 背景使用 興趣點 已顯示在 autofixture 中使用的固定裝置 fixture 對於測試自動化是乙個非常有用的概念。固定裝置 fixture 不僅對單元測試有用,而且該概念也可以在整合測試中重用。在本文中,將解釋什麼是固定裝置 fixture 以及該概念如何用於單元測試和整合測試。固...
自動建立裝置結點
bin bash 1 module name create module device node file if 1 then echo usage install module module name don t need ko suffix exit 1 fiecho remove exist ...
cisco裝置自動備份指令碼
linux下互動式登入工具 expect 需要自己安裝 yum install expect 安裝完成即可,expect功能非常強大 指令碼 如下 iplist.dat為裝置ip檔案 serverlist.dat為tftp備份伺服器ip檔案 這樣新增裝置或者更改tftp伺服器ip的話只需要修改這2個...