Tag: /dev

Linux: Get capacity of a drive with lsblk (NO root permission needed)

Sometimes one needs to know the exact capacity of a drive (e.g. for bash scripts). Here is a one liner for this with lsblk which has the advantage that it doesn’t need root permission:

Tagged with: , , , , ,

Linux: Get capacity of a drive with fdisk (root permission needed)

Sometimes one needs to know the exact capacity of a drive (e.g. for bash scripts). Here is a one liner for this with fdisk:

Tagged with: , , , , ,

Show all available block devices

Sometimes you just want to know which block devices are currently known to your linux system. Well, there are multiple choices for getting this information. Try one of these one liners.

Tagged with: , , ,
Top