Managing shell commands and processes

Not every command you might execute only runs for a couple of seconds. When you have a long running command a couple of problems can come with it. When the ssh connection is not stable, the command might be interrupted, … Continue reading

Posted in Linux Administration | Tagged , , | Comments Off on Managing shell commands and processes

Setup gitolite to manage git repositories

Git provides all the required tools to create remote repositories. As explained in Setup gitosis to manage git repositories, a bare repository can be generated and managed manually or with gitosis, but this is not the only git repository management … Continue reading

Posted in Linux Administration, Version control system | Tagged , | Comments Off on Setup gitolite to manage git repositories

Utility df shows inconsistent calculation for ext filesystems

The output of “df” might sometimes seem inconsistent or wrong and especially in some situations the presented information seems to obviously not match up. The fact is, the information is not wrong but the calculation behind it considers facts that … Continue reading

Posted in Linux Administration | Tagged , , | Comments Off on Utility df shows inconsistent calculation for ext filesystems

Replace section in file with content from another file

While automating things, you might come across the need toĀ replace a block of lines within a file – like replacing a section with IP addresses you want to block in anĀ .htaccess file. Automating this task means replacing this bunch of … Continue reading

Posted in Linux Administration | Tagged | Comments Off on Replace section in file with content from another file

Gitosis Arguments to command look dangerous

Dealing with non-English languages, you might come across a couple of issues caused by special characters. Even gitosis has its limitations in thisĀ area. One of the error messages caused by special characters is: “Arguments to command look dangerous”. When a … Continue reading

Posted in Linux Administration, Version control system | Tagged , , | Comments Off on Gitosis Arguments to command look dangerous

Resize Proxmox VM disc via command line without LiveCD

To increase the disc size from the command line, login to the Proxmox host. In the command line you can list the VMs configured by this command to find the VMID needed. For this example the VM with the VMID … Continue reading

Posted in Linux Administration, Virtualisation | Tagged , , , | Comments Off on Resize Proxmox VM disc via command line without LiveCD

Monit restart not working on CentOS – no pid-file after restart

Monit is a monitoring tool that can monitor processes, files and more. In the event of a failed monitor, monit is able to alert or trigger an action. Often the action triggered is to restart the monitored daemon. With the … Continue reading

Posted in Linux Administration, Monitoring | Tagged , | Comments Off on Monit restart not working on CentOS – no pid-file after restart

Gitosis Unsafe SSH username in keyfile

While configuring and using Gitosis you will probably see the following error sooner or later. This error will appear immediately when changed configuration is pushed to the gitosis-admin repository. With this error, the reported user keys are not provisioned properly … Continue reading

Posted in Linux Administration, Version control system | Tagged , , | Comments Off on Gitosis Unsafe SSH username in keyfile

Restart hanging gpg-agent automatically using swatch on MacOSX

With a smart card reader, you can store your gpg keys on a card to sign, encrypt and even authenticate. What if you try to sign an email but your email client is not responding while signing the email? Or … Continue reading

Posted in MacOSX, Security | Tagged , | Comments Off on Restart hanging gpg-agent automatically using swatch on MacOSX

Add a line into a huge file

Handling huge files can be a massive challenge. In a previous post I have shown how to remove a range of lines from a huge fileĀ (which can also be used to just read a number of lines out of the … Continue reading

Posted in Linux Administration | Tagged | Comments Off on Add a line into a huge file