Skip to content

Instantly share code, notes, and snippets.

@Hagith
Last active August 29, 2015 13:56
Show Gist options
  • Save Hagith/8952050 to your computer and use it in GitHub Desktop.
Save Hagith/8952050 to your computer and use it in GitHub Desktop.
Bash notes
# count lines in directory
find . -type f ! -path "\.git" ! -path "./CMakeFiles/*" | xargs wc -l
# du of hidden directories
du -hs .[^.]*
du -s .[^.]* | sort -nr
# mirror apache listing
wget --execute="robots = off" --mirror --convert-links --no-parent -R index.html [http://example.com/path/to/dir]
find -name "index.html*" -exec rm {} \;
find -name "*\.1" -type f -exec rm {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment