Linux and Unix fmt utility as a simple text formatter

fmt utility is a part of GNU core utilities and allows to reformat paragraph text writing to standard output. It also can read input from stdin. Usage example: Let’s assume you have big one-line text file (all words are placed in one single line and there are no returns characters there at all). In order to format this file with fmt just execute fmt /path/to/file and you’ll get 72 characters […]

Read more →

 

Keep files at Linux/Windows/Unix synchronized with Unison

Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. Unison that is available for Linux, Unix and Windows, shares a number of features with tools such as CVS, […]

Read more →

 

Manage gzip files on-the-fly (zcommands)

Both Linux and Unix like OSes comes with z commands. It allows you to read gzip compressed text files using zless, zcat and zmore etc. gzip reduces the size of the files using Lempel-Ziv coding (LZ77). Whenever possible, each file is replaced by one with the extension .gz, while keeping the same ownership modes, access and modification times. zcommand has some cool usage – such as display the current time […]

Read more →

 

Linux and Solaris filesystems comparison

This is my attempt to cut through the hype and uncertainty to find a storage subsystem that works. I compared XFS and EXT4 under Linux with ZFS under OpenSolaris. The machine is a 2200MHz Athlon 64 with 1GB of memory and 8 400GB disks attached to an Areca ARC-1220 SATA controller. Linux is 2.6.22.5 and OpenSolaris is 5.11 snv_70 “Nevada”. Read more…

Read more →

 

Find out where Unix/Linux executable binary is located

There are two commands that may help you to find where executable binary is located regardless it’s Unix or Linux system. They are whereis and type. First locates source/binary and manuals sections for specified files and second tells what exactly shell executes when you type a certain command. The next picture shows examples of these commands work.

Read more →