Mittwoch, 19. April 2017
Getting the source directory of a Bash script from within
#!/bin/bash

scriptdir=`dirname $(readlink -f $0)`

echo "scriptdir = ${scriptdir}"

... link (0 Kommentare)   ... comment


Changing default crontab editor
select-editor

... link (0 Kommentare)   ... comment


Donnerstag, 17. April 2014
authorized_keys initial anlegen
Wie legt man die Datei authorized_keys initial an, wenn sie noch nicht vorhanden ist:

mkdir .ssh
chmod 700 .ssh
cd .ssh
touch authorized_keys
chmod 600 authorized_keys

... link (0 Kommentare)   ... comment


Mittwoch, 8. Mai 2013
Cron Job einrichten
crontab -e = Cron Tabelle für den aktuellen User bearbeiten (vi Texteditor):

z.B. Shell-Skript täglich um 6:00 ausführen:
0 6 * * * /usr/local/bla/do-something.sh
:wq = Speichern und Beenden

rccron restart = Cron neu starten
rccron status = Cron Status anzeigen

... link (0 Kommentare)   ... comment