Welcome to bashoneliners.com, a curated collection of practical and well-explained Bash one-liners, snippets, tips and tricks. We aim to make each published one-liner to be of high quality: useful, easy to read, follows best practices, with clear, detailed, accurate explanation. These one-liners should help you automate tasks, troubleshoot problems, whether it be in system administration, file management, networking or programming.
git log --since='last month' --author="$(git config user.name)" --oneline
git grep -Ew '[A-Z0-9]{20}'
git commit -m "$(w3m whatthecommit.com | head -n 1)"
svn ls https://github.com/user/repo/trunk/some/path
find ~ -type d -name .git | sed 's?/\.git$??' | awk '{ print "-------------------------"; print "\033[1;32mGit Repo:\033[0m " $0; system("git --git-dir=\""$0"\"/.git --work-tree=\""$0"\" status")}'
git archive master some/project/subdir | tar t
find . -name .DS_Store -exec git rm --ignore-unmatch --cached {} +
svn add . --force
git archive master | tar x -C /path/to/dir/to/export
find . -name .svn -type d | while read ss; do dir=$(dirname "$ss"); test $(ls -a "$dir" | wc -l) == 3 && echo "svn rm \"$dir\""; done
svn st | grep ^? | sed -e 's/^? *//' | xargs -i{} echo rm -fr "{}"
bzr co https://repo1/proj1/trunk proj1 && cd proj1 && bzr push https://repo2/vendor/proj1/trunk