Unix 101 : Showing non-printing characters in text files (ex : DOS files)

A non-printing character is a character which won’t actually get directly printed (or displayed) but rather interpreted. Such non-printing characters are for example line-feed or tabulation. The interpretation of those characters can differ from one system to the next. For example the line-feed character is different on Unix or DOS.

If you need an easy way to confirm that a text file is DOS or UNIX formatted (they differ with respect to the end of line character(s) for example) or if you wish to display normally non-printing characters of a text file, you can use the -vET command line switches of the cat utility.

As explained in the man page :

  • -v : will use the ^ and M- notation for control and multibytes characters
  • -E : will make ends of lines visible
  • -T : will make tabulations visible

For example : Continue reading Unix 101 : Showing non-printing characters in text files (ex : DOS files)

Linux / Unix : Disk usage and identifying biggest files

When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
Continue reading Linux / Unix : Disk usage and identifying biggest files

OpenSolaris : Switching to the /dev development branch

In OpenSolaris, switching to the /dev development branch is a bit like switching to the testing branch for some linux distros. So you might want to think twice before doing so, as it might sometimes break things.

If you still want to do that, follow those instructions :
Continue reading OpenSolaris : Switching to the /dev development branch

SSH : Multiplexing connections

There is a feature in OpenSSH since v3.9 which allows multiple SSH connections with the same caracteristics (host, port, remote login) to be made through a single TCP connection. This is useful because you’ll have to authenticate only once, and besides the new SSH connections will be much faster to establish.
Continue reading SSH : Multiplexing connections

Xen : OpenSolaris 2008.11 DomU running on a Linux Dom0

This post is a step by step explanation about how to get an OpenSolaris 2008.11 run as a Xen DomU on a Linux Dom0.
To follow this, you’ll need a Linux machine ready for Xen (I run Xen 3.3.0), with vncviewer installed.

This post doesn’t explain the basics of Xen, so you might want to start by learning Xen if you don’t already know a bit of it.

Continue reading Xen : OpenSolaris 2008.11 DomU running on a Linux Dom0

shell tip : identify broken symlinks

If you need to identify broken symlinks, you can do the following :
find -L . -type l

The -L options instructs find to follow symlinks when possible. Hence no “working symlink” will ever get returned as the targets won’t match -type l (meaning “file is a symlink”).

On the other hand, find will not be able to follow broken symlinks, so the information will be taken from the symlink itself and not from the non-existent or otherwise unreachable target. The -type l will then be a match and the broken symlink filename will be returned.

Broken symlinks

Case solved 😉

Thanks to the “Ferg’s Gaff” blog (especially the comments) for showing the way !