This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
showmydisks [2015-10-27 22:32] andreas [Limitations] Does not support disks with GUID Partition Table (GTP) |
showmydisks [2020-10-12 21:12] (current) andreas Archived discussion, disabled commenting |
||
---|---|---|---|
Line 117: | Line 117: | ||
Please accept my sincere apology for the horrible coding style of this script. I am not a programmer, and when I started to write this script some 15 years ago my style was indeed worse than today. | Please accept my sincere apology for the horrible coding style of this script. I am not a programmer, and when I started to write this script some 15 years ago my style was indeed worse than today. | ||
- | ~~DISCUSSION~~ | + | ===== Discussion ===== |
+ | |||
+ | < | ||
+ | *Andreas Schamanek, 2009-09-15 13:20* | ||
+ | |||
+ | See also my blog posting [Listing disks, partitions, and more]. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | *Andreas Schamanek, 2009-09-23 09:47, 2009-09-23 09:48* | ||
+ | |||
+ | If on a system [GNU parted] is available one might want to use `parted -l` to list disks, partitions, sizes and file systems. It features nicely formatted output (see below) and detects NTFS file systems. It does not show mount points and free disk spaces, though. | ||
+ | |||
+ | ``` | ||
+ | debian:~# parted -l | ||
+ | Model: SAMSUNG HM120JC (ide) | ||
+ | Disk /dev/hda: 120GB | ||
+ | Sector size (logical/ | ||
+ | Partition Table: msdos | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | Model: WDC WD5000AAKB-00H8A (scsi) | ||
+ | Disk /dev/sda: 500GB | ||
+ | Sector size (logical/ | ||
+ | Partition Table: msdos | ||
+ | |||
+ | Number | ||
+ | | ||
+ | ``` | ||
+ | |||
+ | ---- | ||
+ | |||
+ | *Andreas Schamanek, 2015-09-12 22:43* | ||
+ | |||
+ | Only recently I found the wonderful `lsblk` from the util-linux collection. This is a great alternative providing more details and a beautiful output with several options to configure it. `lsblk` should be available on all major Linux distributions by default. | ||
+ | |||
+ | Example output: | ||
+ | |||
+ | ``` | ||
+ | # lsblk --ascii -o " | ||
+ | NAME TYPE SIZE FSTYPE MOUNTPOINT | ||
+ | sda disk 465.3G | ||
+ | `-sda1 | ||
+ | sdb disk 223.1G | ||
+ | |-sdb1 | ||
+ | |-sdb2 | ||
+ | |-sdb3 | ||
+ | |-sdb5 | ||
+ | |-sdb6 | ||
+ | |-sdb7 | ||
+ | |-sdb8 | ||
+ | |-sdb9 | ||
+ | |-sdb10 part 97.8G ext4 / | ||
+ | `-sdb11 part 88G ext4 | ||
+ | ``` | ||
+ | |||
+ | [Listing disks, partitions, and more]: https:// | ||
+ | [GNU parted]: http:// | ||
+ | |||
+ | </ | ||