In a previous article, I discussed sshfs, a user mode filesystem based on FUSE for accessing remote files. Another useful filesystem type is encfs which provides transparent encryption of directories. With encfs, files are stored encrypted in a special directory under encfs' control. The encryption algorithm and password are specified …
read moreParsing Command Line Options in Shell Scripts
In programs written in C, command line argument parsing has always been done using the getopt(3) library function. This function has set the standards Linux/Unix users have come to expect from command line interfaces. Fortunately, there's a getopt(3) equivalent for almost every programming language and the shell …
read moreMounting Directories via SSH
For mounting directories from a remote machine, usually NFS or SMB/CIFS is used which requires a running file server. On many linux servers, however, all you have is a shell account, so file transfer has to be done via scp.
Using the FUSE Linux kernel module, which provides user …
read moreBuilding RPMs Without Root Access
This week at work I had the opportunity to build an RPM for some third-party software package.
My previous experiences with RPM date back to SuSE 5 almost ten years ago and I haven't touched it ever since. Packaging for Debian or even NetBSD is mostly a painless process, so …
read moreChanging Directories Quickly
When you work with the interactive shell, there's a common pattern that is used a lot: Copying or moving files to a directory and then changing to the target directory using cd. In these cases, you find yourself typing the name twice:
$ cp file1 file2 file3 /very/long/path/name …
read moreLightweight Package Management using Stow
Package management tools like apt-get make it very easy to install and remove software. The package manager takes care of downloading the package together with its dependencies if, of course, someone has taken the time to create a package and made it available to you. In some cases, you don't …
read moreControlling Firefox via Command Line
Mozilla-based browsers like Firefox have inherited a useful feature from the good old Netscape Navigator: Controlling a running browser instance via the command line. Using command line options, you can open URLs or files inside your browser window without having to enter them in the address bar.
Suppose you're working …
read morePrinting RFCs and Internet Drafts
The a2ps command line utility converts text files to PostScript which can then be sent to a printer. The resulting output contains all kinds of boxes and additional information which limits the space on the printed page to make your own notes.
Of course, this can all be turned off …
read moreUsing D-Bus Introspection
To control a D-Bus-enabled application, you need the interface definition to find out which methods are offered and which parameters they expect.
Of course, you can get the relevant interface definition from the application's source distribution. But there's an easier way: Ask the object in question via D-Bus to …
read moreClassic Revision Control using RCS
The Revision Control System (RCS) is one of the ancestors of modern versioning systems like Subversion. It lacks many of the features its successors provide, such as assigning tags to a set of files, but in some environments it is still very useful. RCS requires no server or central repository …
read more