Skip to content

Instantly share code, notes, and snippets.

@joshfriend
Last active August 29, 2015 14:02
Show Gist options
  • Save joshfriend/73b62651d0c29a1ef120 to your computer and use it in GitHub Desktop.
Save joshfriend/73b62651d0c29a1ef120 to your computer and use it in GitHub Desktop.
Interesting commands
# Count file types in an SVN repo
svn ls -R http://url/to/repo | tr '[:upper:]' '[:lower:]' | grep -E ".*\.[a-zA-Z0-9]*$" | sed -e 's/.*\(\.[a-zA-Z0-9]*\)$/\1/' | sort | uniq -c | sort -n
# Get the total SVN repo size on server and file count
svn list -vR http://url/to/repo | awk '{if ($3 !="") sum+=$3; i++} END {print "\ntotal size= " sum/1048576" MB" "\nnumber of files= " i/1000 " K"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment