Simple bash snippets, obscure config zen or an elaborate ssh-keygen command sequence are collected here.
In the past I have already worked with a project that consisted of multiple Git repositories in a common project folder. For tracking each repository’s individual state together, Google’s repo tool was used. I ended up using mostly its powerful repo forall subcommand to execute various bash or git commands over the whole or subset…
The following bash function (e.g. stored in your ~/.bash_aliases) finds all files within a directory that was changed on a specific date. I use this to retroactively check on all my activities throughout a day. For code-related changes, a filtered git log certainly is better, but this includes file downloads, modified text documents in one…
Just a note to myself, as I always have a hard time understanding the find manpages. To list the directories and subdirectories up to a certain depth, “simply” enter: [bash light=”1″] find . -maxdepth 2 -type d [/bash] Option maxdepth states how deep the subdirectories should be listed, option type restricts output to directories (d).…
Note to self, it’s deceptively simple, once one manages to read the manpages properly: [code lang=”bash” gutter=”false”]du -hd 1 /path/to/directory[/code] If directory is the current folder, this shortens to: [code lang=”bash” gutter=”false”]du -hd 1[/code]