#!/bin/bash function output { echo "Usage: $0 hostname" echo "Level 2!" echo "find . -iname \"*FILE_NAMES_HERE*\" -print0 | du --files0-from=- -hc | sort -h" echo "" echo "It's dangerous to go alone. Take this!" echo "du -hx --max-depth=1 | sort -h" } # Usage if [ "$#" == "0" ]; then output exit 1 fi ssh $1 "cd /; du -hx --max-depth=1 | sort -h | tail" output