From b80fdb65d8a5fc038fd5813b063de085cf70b700 Mon Sep 17 00:00:00 2001 From: z7y8hsBP <51470766+z7y8hsBP@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:40:35 +0100 Subject: [PATCH] losetup: added example for --read-only and --partscan (#3792) --- pages/linux/losetup.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/linux/losetup.md b/pages/linux/losetup.md index 2fc0aa281..9a861fca0 100644 --- a/pages/linux/losetup.md +++ b/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}}`