Posted in Uncategorized

tmux – Keep Jobs Running

tmux – a “terminal multiplexer” – lets you control several windows to the command line from one terminal session. Additionally you can leave tmux and close the terminal – this is very handy, if you have long running programs, and have to leave the office.

Continue reading “tmux – Keep Jobs Running”

Advertisements
Posted in Linux commands

Make temporary Files or directories

Sometimes I need a temporary file or a temporary directory with a unique name in my scripts. Of course I can create a file in /tmp with the actual time in its name. But what if some other user has the same idea, and the scripts run at the same time? Here comes mktemp.

Continue reading “Make temporary Files or directories”

Posted in Linux commands

systemd, Part I

For my sensor network I run a server process, which collects the data from several sensors. This is a sort of a daemon. In a first version it was started in a crontab with the time “@reboot”. But during the development I had to restart it every now and then: search the PID, kill it, start it in the background.

Isn’t there a better way? systemd to the rescue. In this first systemd post I will install a service file, so that the process can be started and stopped from the root account.

Continue reading “systemd, Part I”