浏览代码

losetup: added example for --read-only and --partscan (#3792)

z7y8hsBP 5 年之前
父节点
当前提交
b80fdb65d8
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      pages/linux/losetup.md

+ 8 - 0
pages/linux/losetup.md

@@ -17,3 +17,11 @@
 - Detach a given loop device:
 
 `sudo losetup -d /dev/{{loop}}`
+
+- Attach a file to a new free loop device and scan the device for partitions:
+
+`sudo losetup --show --partscan -f /{{path/to/file}}`
+
+- Attach a file to a read-only loop device:
+
+`sudo losetup --read-only /dev/{{loop}} /{{path/to/file}}`