I’m looking to create a script that lists the unformatted partitions/disks in Linux OS. I couldn’t find a reliable way of listing the unformatted disks / partitions. I tried to use lsblk –output NAME,FSTYPE,MOUNTPOINT | grep “sd” which outputted: The names which do not have mountpoint listed against them are unformatted disks. How can I get those names? Or what
Tag: disk-partitioning
Are badblocks related to a partition or permanent? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
How to check a disk for partitions for use in a script in Linux?
I’m scripting something in Bash for Linux systems. How would I check a disk for partitions in a robust manner? I could use grep, awk, or sed to parse the output from fdisk, sfdisk, etc., but this doesn’t seem to be an exact science. I could also check if there are partitions in /dev, but it is also possible that