Skip to content

Instantly share code, notes, and snippets.

View toh82's full-sized avatar

Tobias Hartmann toh82

View GitHub Profile
#!/bin/bash
apt-get update
echo
echo "Installing git"
echo "-----------------------------------------"
echo
sudo apt-get install -y git
@toh82
toh82 / terminal_commands.md
Last active December 7, 2017 14:43
Collection of Terminal commands

Symlinks

  • ln -sfn [linkbase] [linktarget] Makes a symbolic link and if the link already exists it creates it with the new options. This does not work for files since the n parameter stand fpr directory.

Database

  • mysqldump -u root -p [DB-NAME] | gzip > [DB-NAME].sql.gz dump a DB and gzip it.
  • zcat [DB-NAME].sql.gz | mysql -u root -p [DB-NAME] import a gzipped dumb to DB.

Git

  • git clone [repo url] --branch [branch name] to clone a repo with a specific branch

Keybase proof

I hereby claim:

  • I am toh82 on github.
  • I am toh (https://keybase.io/toh) on keybase.
  • I have a public key ASCgMFcQaeFMYlinxGNU86MNCdOATxDEjxXkEP4dW7_aVAo

To claim this, I am signing this object: