Skip to content

Instantly share code, notes, and snippets.

@vladpurga
Created July 16, 2019 14:37
Show Gist options
  • Select an option

  • Save vladpurga/2ce4106f465e6e94407ee604d2c372cc to your computer and use it in GitHub Desktop.

Select an option

Save vladpurga/2ce4106f465e6e94407ee604d2c372cc to your computer and use it in GitHub Desktop.

Revisions

  1. vladpurga created this gist Jul 16, 2019.
    1 change: 1 addition & 0 deletions tune2fs-space-reserved.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ssh -t host "sudo tune2fs -l /dev/sdb1 | grep -i 'block count' | cut -d':' -f2 | tr -d ' ' | awk 'BEGIN {FS=\"\n\"; RS=\"\"} {print \"/dev/sdb1 space reserved: \"\$2/\$1*100\"%\"}'"