Category: Tutorials

Bash Collection – Howto recursively replace file headers of source files

Gerhard Gappmeier has submitted a really cool and useful bash script, that he is using for years now. It is very helpful for developers. This scripts can replace file headers from C/C++/JAVA header and source files. Often it’s necessary to replace the license conditions in multiple source files, update the copyright year, or simply make […]


Bash Collection – Script to get the real amount of used memory of an application

The following script was written by me to be able to get the really used amount of memory for one single application. Since it isn’t that easy to get the used memory through “top” or “ps” or similar tools, this may be helpful for somebody. The output is in megabytes and looks like this:


Bash Collection – Script for cutting parts from large file

The following small script was written by me in order to be able to simply cut parts from very large text files. It is very useful for database administrators to for example cut the SQL statements for creating and restoring one single table from a really large SQL dump. For this you would need to […]


Where’s That Pesky Hidden Word?

I’ve been promising my 11-year-old for a long time now that I’d write a
program that would let you build custom word searches based on a list of
words given by the user. I wrote one years and years ago in C, but since I
can’t find that code any more and wanted to tackle another interesting
project for this column, that’s what I’m going to look at herein.


Hacking a Safe with Bash

Through the years, I have settled on maintaining my sensitive data in
files that I then encrypt asymmetrically. Although I take care to harden my
system and encrypt partitions with LUKS wherever possible, I want to secure my
most important data using higher-level tools, thereby lessening dependence on
the underlying system configuration. more>>


Embed Linux in Monitoring and Control Systems

The target vehicle for this project is a vintage intercity transport bus (think
Greyhound) whose instrument panel was sparse and mostly nonfunctional.
The speedometer cable was twisted off some place back in 40 feet of
and the fuel sensor had sunk long ago. What I wanted was an instrument
panel more in line with modern practice.


Home Automation with Raspberry Pi

The Raspberry Pi has been very popular among hobbyists and educators
ever since its launch in 2011. The Raspberry Pi is a credit-card-sized
single-board computer with a Broadcom BCM 2835 SoC, 256MB to 512MB of RAM,
USB ports, GPIO pins, Ethernet, HDMI out, camera header and an SD card
slot. more>>


PHP for Non-Developers

After years of making it clear that I’m not a developer in just
about every article I’ve written here at Linux Journal, I do have a
confession to make. I can write the “Hello World” equivalent in almost
every programming language out there. In assembly, it might have been
“1+1”, but my lack of advanced skills should be evident. more>>


Secure Server Deployments in Hostile Territory

Would you change what you said on the phone, if you knew someone malicious was listening?
Whether or not you view the NSA as malicious, I imagine that after reading the NSA coverage on
Linux Journal, some of you found yourselves modifying your behavior. The same thing
happened to me when I started deploying servers into a public cloud (EC2 in my case).


Django Templates

In my last article (February 2015), I explained how to create a simple
Django project (“atfproject”) and
inside that, create a simple application (atfapp). The
application worked in that if you went to the URL
you got the text “hello, Reuven”.


Dr Hjkl on the Command Line

The first time I used vi was in a college programming course. It was the
default editor on the computer lab’s UNIX systems we used to compile our
assignments. I remember when our professor first introduced vi and
explained that you used the hjkl keys to move your cursor around instead of
the arrow keys. more>>


It’s Easier to Ask Forgiveness…

…than to understand Linux permissions! Honestly though, that’s
not really true. Linux permissions are simple and elegant, and once you
understand them, they’re easy to work with. Octal notation gets a little funky,
but even that makes sense once you understand why it exists.

Users and Groups: