Showing posts with label Bash. Show all posts
Showing posts with label Bash. Show all posts

Tuesday, August 16, 2016

Tar create/extract inside a specific directory

Create
tar -cf output.tar -C /path/to/directory .
The dot at the end is important

Extract
tar -xf input.tar -C /path/to/directory

Friday, November 27, 2015

Terminal.app doesn't save history in El Capitan and you are using RVM

The cause is described here https://github.com/rvm/rvm/issues/3540#issue-113491283
The fix is here https://github.com/rvm/rvm/issues/3540#issuecomment-152824133

I copied the fix here just in case it's removed in the future

Another option is to create .bash_logout with a single line:

shell_session_update

Friday, March 27, 2015

Set bash completion when aliasing docker to d

After you installed docker bash completion, either by sourcing it from your .bash_profile or installing it to bash-completion, add this line to the end of your docker-completion.sh file.
complete -F _docker d
Reload your shell. And that's it!

Note: change the last d to other character you aliased docker to

Collectd PostgreSQL Plugin

I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresq...