Skip to content
Browse files

Update command to match AWS convention

  • Loading branch information...
1 parent 2f65ddb commit cd8b68ceb99ff93a38d18249f9480d6a1cca8d36 @fredrick fredrick committed Jun 6, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −0 ec2/ec2-delete-snapshots
  2. +0 −4 ec2/ec2-snapshot-delete.sh
View
8 ec2/ec2-delete-snapshots
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Fredrick Galoso (c) 2012
+# https://github.com/stackd/tools
+
+# ec2-delete-snapshots: Deletes the oldest N-th snapshots
+# Example (delete the last 200 snapshots): ec2-delete-snapshots 200
+ec2-describe-snapshots | sort -k 5 | head -$1 | awk '{print "Deleting: " $2; system("ec2-delete-snapshot " $2)}'
View
4 ec2/ec2-snapshot-delete.sh
@@ -1,4 +0,0 @@
-#!/bin/sh
-# ec2-snapshot-delete: Deletes the oldest N-th snapshots
-# Example (delete the 200th oldest snapshots): ec2-snapshot-delete 200
-ec2-describe-snapshots | sort -k 5 | head -$1 | awk '{print "Deleting: " $2; system("ec2-delete-snapshot " $2)}'

0 comments on commit cd8b68c

Please sign in to comment.
Something went wrong with that request. Please try again.