Meta
December 2024 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Blogroll
IP info
Programs
Category Archives: Bash
Bash training I gave some years ago
This is a Bash training I gave some years ago, which I had — however — prepared on my own time. Some parts may be outdated. Others may need some touching up, but in general I think it can be … Continue reading
Running old Ubuntu versions as chroot with proot
Currently I am working on building a modern Clang/LLVM-based toolchain for ancient Ubuntu versions. In order to do that I wrote a few helper scripts I am using in conjunction with proot to run old Ubuntu rootfs inside a chroot … Continue reading
Posted in Bash, EN, Linux, Programming, Software, Unix and unixoid
Tagged proot, ubuntu
Leave a comment
prune-kernels function …
If you are like me, you will have noticed on Ubuntu (and sometimes Debian) that stale old kernels remain on the disk even when they aren’t needed anymore. I wrote a little Bash function to get rid of those kernels. … Continue reading
Posted in Administration, Bash, EN, Linux, Programming, Unix and unixoid
Tagged bash
Leave a comment
Selecting the editor on Debian/Ubuntu non-interactively
Set the selected editor on Ubuntu/Debian for yourself and root in one line: echo ‘SELECTED_EDITOR=”/usr/bin/vim.nox”‘|tee $HOME/.selected_editor| \ sudo tee /root/.selected_editor or echo “SELECTED_EDITOR=\”$(which vim.nox)\””|tee $HOME/.selected_editor| \ sudo tee /root/.selected_editor // Oliver
by the way …
Convenient little snippet to get my external IP: echo $(wget -q -O – ip.assarbad.net/text)
Posted in Administration, Bash, EN, Linux, Unix and unixoid
Leave a comment
CVS and SSH on a very old machine …
Had trouble getting it to work with ancient versions of ssh (OpenSSH_3.1p1) and cvs (Concurrent Versions System (CVS) 1.11.20). Until I figured that I could write a little wrapper script to see what’s wrong. The wrapper script looked like this: … Continue reading
Top ten disk space hogs in current folder
du -cks *|sort -rn|head -11|awk ‘{printf “%-8.2f MiB\t%s\n”, $1/1024, $2}’ NB: first item is the total size, so it outputs eleven lines. Update: a better version is this one: du -cks *|sort -rn|head -11|awk ‘{printf “%-8.2f MiB\t”, $1/1024;\ for(i=2; i
Posted in /dev/null, Bash, EN, Linux, Unix and unixoid
Leave a comment
DNAT for a Jabber/XMPP service
Problem: you have one external IP and want to run separate services on different hosts behind the router. Here’s a small script to DNAT the router to the host behind it. Netfilter will take care of the return traffic (so … Continue reading
Posted in Bash, EN, Linux, Software
Leave a comment