new script shows fdisk report for real hard drives
authorChris Koeritz <fred@gruntose.com>
Wed, 1 Nov 2023 04:27:24 +0000 (00:27 -0400)
committerChris Koeritz <fred@gruntose.com>
Wed, 1 Nov 2023 04:27:24 +0000 (00:27 -0400)
scripts/system/show_disks.sh [new file with mode: 0644]

diff --git a/scripts/system/show_disks.sh b/scripts/system/show_disks.sh
new file mode 100644 (file)
index 0000000..2a32bb6
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# shows fdisk report for "real" devices.
+
+for device in \
+    $(grep "sd.*[0-9]" /proc/partitions | awk '{ print "/dev/" $4 }') \
+; do
+  echo
+  echo
+  echo ==== device $device ====
+  sudo fdisk -l $device
+done
+