[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to get the size of the loop-device?
Once I have a working loop device, e.g. /dev/loop5, how can I get the
size of this device in bytes for bash-script?
I need this, so that I can create two loop-devices on top on it, like
losetup -o 0 -s $halfsize /dev/loop6 /dev/loop5
losetup -o $halfsize /dev/loop7 /dev/loop5
I tried trivial `perl -e 'print -s "/dev/loop5"'`, but it just returns zero.
There's likely a trivial answer to this, but I havn't been able to find it.
--
Markus Laire
-
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/