Archive for category linux

Fun with windows subsystem for linux Part 3

Now there Debian available over the Microsoft Store on Windows 10. Very small RAM usage, much better than the ubuntu version.

Open PowerShell as Administrator and run:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Then Open the Microsoft Store and search for debian.

The File are now in C:\Users\%USERNAME%\AppData\Local\Packages\TheDebianProject.DebianGNULinux_*

I wonder why it is no longer in C:\Users\%USERNAME%\AppData\Local\lxss\

For having correct displayed german characters I had to change the console

sudo dpkg-reconfigure locales
sudo apt install console-setup
sudo dpkg-reconfigure console-setup

rm -rf argument list too long

Well to often here is this the error message rm -rf argument list too long cause there are too many file in the directory. With the help of a little script those files can be deleted.

for FILE in `ls`
rm $FILE

Tags: , ,

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!?


Archives by Subject:

Archives by Month: