Skip to content

Instantly share code, notes, and snippets.

@ragaar
ragaar / dirlot.sh
Created October 25, 2019 17:38
Shows the size of files and subdirectories in a directory
# Shows the size of files and subdirectories in a directory
# Depth of five (5) folders deep; this goes down to the container volumes.
# d=5
# Specify a path, should a sub-directory be desired.
# p=</path/of/interest>;
# Exclude all of the system paths that are not actively written to.
# e='--exclude=</path/to/exclude>'
# Disk Usage, human-readable, depth, threshold 1GB, path, exclusions
# du -h -d ${d} -t 1G ${p} ${e}

Keybase proof

I hereby claim:

  • I am ragaar on github.
  • I am ragaar (https://keybase.io/ragaar) on keybase.
  • I have a public key ASCdUkTfJahPwAGWQHKQudmT_pEmRxv_S1xSo5v0VLtQjQo

To claim this, I am signing this object:

@ragaar
ragaar / cleanup.sh
Last active June 21, 2019 17:55
Cleanup script for Rancher v2.x
#!/bin/sh
containers=$(docker ps -qa)
for container in $containers; do
echo "Removing $container"
done
if [ ! -z "$containers" ]
then
docker rm -f $containers