Skip to content

Instantly share code, notes, and snippets.

@gomesar
Created May 8, 2018 17:17
Show Gist options
  • Save gomesar/d77228fd1cd805783f0e41cae0716ec9 to your computer and use it in GitHub Desktop.
Save gomesar/d77228fd1cd805783f0e41cae0716ec9 to your computer and use it in GitHub Desktop.
Find 10 largest files in directory
#!/bin/bash
# Find 10 largest files in directory
# find /path/to/search/ -type f -printf '%s %p\n'| sort -nr | head -10
find "${1}" -type f -printf '%s %p\n'| sort -nr | head -10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment