Category Archives: Linux

Linux serial TTY hanging

Today, I had the problem that my serial TTY (/dev/ttyACM0, serial over USB) was apparently hanging when receiving data. However, when more data was sent by the other side, the communication would eventually resume. So at first, I though some … Continue reading

Posted in Linux | Leave a comment

How to detect a transparent proxy with nmap

On some networks, the outbound traffic to web servers (ports 80 and 443) might be intercepted on the fly by a transparent proxy. A simple way to try to detect such a proxy with nmap is to run the following … Continue reading

Posted in Linux | Leave a comment

Shell scripting: triming text from start to end markers with sed or awk

Let’s assume you have a huge log file looking like this: Let’s assume you are interested only in the part between 2015-09-07 12:10 and 2015-09-07 12:15. Here is a sed script that will do the job: Here is also an … Continue reading

Posted in Linux | Leave a comment

BTRFS: moving data between subvolumes efficiently

If you move files naively between BTRFS subvolumes like this: … the data will be effectively read from and written back to the physical storage, which can become a problem if you have many or big files, especially when the … Continue reading

Posted in Linux | Leave a comment

How to generate a list of dates from the shell (bash)

Here is a shell script that will generate the dates of the monday’s within the given range. It requires bash and the GNU version of the date command (gdate in my case). Currently it works only if the date format … Continue reading

Posted in Linux | Leave a comment

Extract maintainer scripts (e.g. control files) from a Debian package

If you need to see the control files of a Debian package (conffiles, config, control, md5sums, postinst, postrm, preinst, prerm, template), run the following commands:

Posted in Linux | Leave a comment

Installing shellinabox on Debian stable (squeeze)

Shellinabox is a great tool that allows to open a terminal session (e.g. a shell) on your server through HTTP and/or Apache. It’s particularly useful when you are a network that doesn’t allow outgoing SSH connections, like in a many … Continue reading

Posted in Linux | Leave a comment

Why I may well switch away from the Mac

Let me share with you an incredible story that just happened to me: Monday The battery of my Macbook Pro (early 2011) is completely dead, after only 16 months and 130 load cycles. The 12 months warranty is of course … Continue reading

Posted in Linux, Mac | 5 Comments

Installing debian on a Popcorn Hour A-210

Instructions based on: http://www.networkedmediatank.com/showthread.php?tid=16317 On an existing Debian or Ubuntu system: apt-get install debootstrap debootstrap –arch mipsel –foreign stable debian tar -cvzf debian.tgz debian mount –bind /proc/ debian/proc/ mount –bind /dev/ debian/dev/ Copy the TGZ to your device, log in … Continue reading

Posted in Linux | Tagged | Leave a comment