Skip to content

canonical/disk-util

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example disk utility snap

Build using snapcraft and connect the interfaces:

sudo snap connect disk-util:hardware-observe
sudo snap connect disk-util:udisks2
sudo snap connect disk-util:block-devices

Usage

Listing block devices

disk-util.list

Creating a partition Partitions need to be created with a valid type e.g. 0x83, size and offset (in bytes). Note that the block device needs to be provided (not the partition) i.e. sdd not sdd3.

sudo disk-util.create sdd 0x83 55574528 1048576

Create and format a partition The create-format command creates a partition as a single step. The parameters need to be supplied as per the create command, with the additional format of the partition e.g. ext4.

sudo disk-util.create-format sdd 0x83 55574528 1048576 ext4

Delete a partition Remove an existing partition.

sudo disk-util.delete sdd3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 87.9%
  • Shell 12.1%