Skip to content

Instantly share code, notes, and snippets.

@proegssilb
Created June 11, 2018 04:35
Show Gist options
  • Save proegssilb/363e0bcb3981247e46f7b89336074bc6 to your computer and use it in GitHub Desktop.
Save proegssilb/363e0bcb3981247e46f7b89336074bc6 to your computer and use it in GitHub Desktop.
A quickie bash script I might need later...
#!/bin/bash
for dev in /dev/sd[b-q]; do
[ -e "$dev" ] || continue
fdisk "$dev" <<EEOF
g
n
w
EEOF
done
@proegssilb
Copy link
Author

This partitions several disks with a brand new GPT partition table and a single partition taking up the entire disc. If you have 16 drives that all need to be partitioned...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment