Ravi Sir's Cards › AWS
Top ops scripts
This revision card explains Top ops scripts. It starts from the need that dated backup + keep 7. It describes disk check. The how-to section notes URL check. An example on the card is symlink deploy.
Read card text
What this card says
Why do we need it?
Dated backup + keep 7.
ls -1t *.tgz | tail -n +8 | xargs -r rm
What is it?
Disk check.
df -P | awk 'NR>1{print $5,$6}'
How to do it
URL check.
curl -s -o /dev/null -w '%{http_code}' URL
Example
Symlink deploy.
ln -sfn $rel /srv/app/current