Skip to content

Instantly share code, notes, and snippets.

@vicente-gonzalez-ruiz
Last active May 27, 2020 13:32
Show Gist options
  • Save vicente-gonzalez-ruiz/eac0bcf13b0c2674c1d481074bcce1bf to your computer and use it in GitHub Desktop.
Save vicente-gonzalez-ruiz/eac0bcf13b0c2674c1d481074bcce1bf to your computer and use it in GitHub Desktop.
# Show partition information:
sudo fdisk /dev/<device><partition>
# Example:
sudo fdisk /dev/sde
Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sde: 2,75 TiB, 3000558944256 bytes, 732558336 sectors
Disk model: My Book 1130
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000246c6
Device Boot Start End Sectors Size Id Type
/dev/sde1 256 732558335 732558080 2,7T 7 HPFS/NTFS/exFAT
# Show format:
lsblk -f
# (Quick) Format partition (example):
sudo mkntfs -v -Q -L <label> /dev/sde1
# Fix errors (example):
sudo ntfsfix /dev/sde1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment