Command Line Goodies

Watch Logfiles

Watch a text file as it grows:

tail -f logfile.txt

Print out iso date format

date --iso-8601=minutes

produces for example 2016-10-21T19:53+02:00

SSH Tips

Run ssh-agent in remote login

When you log into a machine with SSH and want to use a SSH key to do further stuff, like managing a remote git repository, you may have to

eval $(ssh-agent -s)
ssh-add ~/.ssh/your_ssh_id

according to this site. Then the shell remembers your SSH key as long as it is open.

CentOS 7 Tips

Manage additional Repositories For CentOS 7 there exist additional repositories; for additional codecs for example. This website lists the most useful ones. I use the Nux-Dextop repository but I don’t want to have it turned on the whole time. So I use sudo yum-config-manager --enable nux-dextop to enable this repo. And when I’m done installing or updating with yum, I use sudo yum-config-manager --disable nux-dextop to disable this repo again. [Read More]

Dropbox in CentOs 7

Install Dropbox in CentOS 7 This website has a nice overview over the installation process. First, you need to sudo yum install libgnome and then download the Dropbox Fedora (.rpm) package from Dropbox and install it with sudo rpm -ivh nautilus-dropbox[...].rpm Then you can start Dropbox and log in with your accound details. Repair package manager yum If you use yum (e.g yum update) after Dropbox installation, you will probably encounter an error that a certain . [Read More]

Bash Aliases

Aliases for command line in .bashrc In ubuntu the .bashrc file has a command that looks for ~/.bash_aliases and includes it. Here you find my .bash_aliases file with useful aliases. This is the code in the .bashrc file: # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/. [Read More]
linux  bash