Archive for category linux

Things to know about nano editor

Open nano with

nano -wcF

ALT + G = Goto Line Number
CTRL + R = Insert File
CTRL + W = Search String or by RegEx
ALT + R = Replace string or Replace by RegEx
ALT + , = Goto previous buffer
ALT + . Goto next Buffer

debian boots into uefi shell

Today one of my linux servers did not boot. Instead there was a grub uefi shell. Typing the help command listed a bunch of commands in dark blue on a dark grey. Not easy to read. Trying to use the gui did not solve the problem. Resetting the config did also not help. Some forum posts said to create a symlink to the efi file. My issue was that /boot/efi is a separate partion due btrfs on the my system.

What did work was using the command line to add the efi again.

bcfg boot add 0 fs0:\EFI\debian\grubx64.efi "Debian"

However writing in english mode on a german style keyboard is often “times of wonder”. Use # ( hash) for the backslash and ä for the quotes. I still wonder why I have to use a backslash on a linux system…

Tags: ,

Bash list only hidden files

A shortcut / alias for listing only hidden files and folders<

alias us="ls -la | grep ^- | awk '{print \$9}' | grep ^\\\."

print only file name with ls -l

There is an easy trick to display only the filename with ls -l

ls -l | awk '{print $9}'

nano goto line number

It is very hidden how to go to a line number in linux nano editor

  • strg + w
  • strg + t
  • enter Line number


Find the largest files on your linux system

Find the largest files on your linux system

cd /
du -k | sort -n | perl -ne 'if ( /^(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024)); printf  ("%6.1f\t%s\t%25s  %s\n",($1/(2**(10*$m))),(("K","M","G","T","P")[$m]),"*"x (1.5*$l),$2);}'


Subversion (svn) 1.8 on Debian 7 wheezy

Just installed a brand new debian and than I can’t use my working copies cause the svn version is still 1.6.x
So an upgraded is required!


wget -O /tmp/wd-deb.gpg
apt-key add /tmp/wd-deb.gpg
rm /tmp/wd-deb.gpg
sudo nano /etc/apt/sources.list

deb wheezy svn18

So now I can have fun again! Why not git? Cause the company repos are still in svn and I had some troubles with git-svn.

/dev/null: Permission denied

Das ist mal ein nette Fehlermeldung! Also, wie reparieren?

sudo rm /dev/null
sudo mknod -m 0666 /dev/null c 1 3

und schwups geht alles wieder. Bleibt nur die Frage, wieso und wann das  kaputt gegangen ist!?


farbige man pages

Man pages sind nicht immer sehr übersichtlich. Die man pages etwas einzufärben hilft!

ans Ende der .bashrc

export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

schon sind die man pages in Farbe.

Tags: , , , ,

Upgrading OpenSSL on Debian 6 (squeeze) or Ubuntu 8.04 (hardy)

The Problem on the long term ubuntu 8.04 and the current stable debian is that they ship the old OpenSSL 0.9.8o With that I wasn’t able to compile the new apache 2.4.1 with all the SSL features I want. Downloading the OpenSSL source and just configure make make install didn’t help at all.

checking whether to enable mod_ssl... checking dependencies 
 checking for OpenSSL... checking for user-provided OpenSSL base directory... none 
 checking for OpenSSL version >= 0.9.7... FAILED 
 configure: WARNING: OpenSSL version is too old 
 checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but can not be built due to prerequisite failures 
 mario@h2020668:~/apache24/httpd-2.4.1$ openssl version 
 OpenSSL 0.9.8o 01 Jun 2010

The only thing that helped was to use the unix config script plus the right prefix plus the shared option

 tar xfz openssl-1.0.1.tar.gz 
 cd openssl-* 
 ./config --prefix=/usr zlib-dynamic --openssldir=/etc/ssl shared 
 sudo make install


Debian is very fine, but sometimes it sucks because of the lag of new software versions

Tags: , , , ,

Archives by Subject:

Archives by Month: