Skip to content

Instantly share code, notes, and snippets.

@mbierman
Created June 29, 2024 08:04
Show Gist options
  • Save mbierman/167a8c4bfb047778bfa3a6886aa2ec06 to your computer and use it in GitHub Desktop.
Save mbierman/167a8c4bfb047778bfa3a6886aa2ec06 to your computer and use it in GitHub Desktop.
Finds files larger than 6 megabytes starting at $1
#!/bin/bash
if [ -z "$1" ]; then
echo "Specify which directory you want to check."
i exit
else
echo "Checking \$1 ... "
fi
sudo find "$1" -type f -size +6M -exec ls -lh {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment