Infra_HDC

Linux, get ISO 9660 size in bytes

Mar 22nd, 2022 (edited)
1,004
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. user@host:/path/to/NIX/ubuntu/20.04.4$ isoinfo -d -i ubuntu-20.04.4-live-server-amd64.iso | awk '/^Volume\ size\ is:/ { print $4 "*2048"; }' | bc
  2. 1331691520
  3. user@host:/path/to/NIX/ubuntu/20.04.4$ ls -l ubuntu-20.04.4-live-server-amd64.iso
  4. -rw-r--r-- 1 user user 1331691520 фев 23 12:27 ubuntu-20.04.4-live-server-amd64.iso
  5. # for real use in dd if=/dev/sr0 bs=2048
  6. user@host:/path/to/NIX/ubuntu/20.04.4$ isoinfo -d -i /dev/sr0 | awk '/^Volume\ size\ is:/ { print $4; }'
  7. user@host:/path/to/NIX/ubuntu/20.04.4$ dd if=/dev/sr0 bs=2048 count=`isoinfo -d -i /dev/sr0 | awk '/^Volume\ size\ is:/ { print $4; }'` | sha512sum -b
Add Comment
Please, Sign In to add comment