Weblog Archives

You are currently browsing the archives for the Shell tag.

Auto-closing SSH tunnels

In some of my older articles, at least where an SSH tunnel is involved, I keep mentioning a specific way of initializing such an encrypted tunnel, which results in the automatic closure of the tunnel after the job on the remote server is finished. Since this is my method of choice, I decided to provide [...]

Netcat – a couple of useful examples

One of the Linux command line tools I had initially under-estimated is netcat or just nc. By default, netcat creates a TCP socket either in listening mode (server socket) or a socket that is used in order to connect to a server (client mode). Actually, netcat does not care whether the socket is meant to [...]

Verify a burned CD/DVD image on Linux

Recently, much to my surprise, I found out that some critical data I had burned on DVD could not be read back from the medium. A more thorough examination showed that many of the files on the DVD had different filesizes than the ones on the hard disk. This is when I started to seriously [...]

Write A Man Page

Some links about how to write a man page: How to Write man Pages Writing man-pages THE LINUX MAN-PAGE-HOWTO Last, but not least: # man 7 groff_man This man page contains all the macros that can be used in a manual page.

Awesome AWK Tutorial

My quest for the best AWK tutorial has reached an end. The University of Georgia has set up a guide, small in size, but with content of high quality, which can help someone that knows the basics of programming to get started quickly. Of course, there are many other free online high quality guides, but [...]

Using a CUPS printer from command line

This is a quick reference to the commands and print job options a user can use from command line in order to print documents. Although print dialogs have evolved, it’s many times necessary to send a document to the printer with some extra options. For detailed explanation of each command’s functionality please refer to the CUPS user documentation.

The use of the uppercase X in chmod

I am aware that there are numerous guides about file permissions in linux out there. This post is not intended to be another tutorial. I just wanted to emphasize the use of uppercase X when modifying regular file or directory permissions. This info seems to be missing from most of those guides.

Monitoring a pipe…

It is sometimes needed that you monitor the progress of data through a pipe. After searching around the net, I finally discovered a little terminal-based utility that does exactly that! It’s called Pipe Viewer or just PV. Here is some quick info on how to use this tool.

User management from the command line

This is a short article about the most common practices in user and group management from the command line. The information is specific to Fedora Core and Red Hat based distros, but would do for any distribution probably with slight differences in the command options.

SSH Tunnels Headaches

I’m writing a VNC mini howto and I got stuck with something. I wanted to do the following with a single command: create the SSH tunnel (local port forwarding) execute vncviewer on the local machine have the SSH tunnel to be automatically closed at the time vncviewer was closed