Linux Commands - Administrative Commands


The fmt command allows you to format text to a specific width.



-u uniform spacing

-w width, default is 75 characters



This command may be used to join data from two separate files. It can be used as a simple database configuration method.


Here is the first file, d1.

1 mike

2 fred

3 tom

4 mary

Here is the second file.


1 87jKl45F

2 ho7%kd9

3 hom873J

4 modj8#


Here the two files are joined and a third file is created (d3) with the completed process. Note the numbering of the lines.

join -j 1 d1 d2 > d3

cat d3

1 mike 87jKl45F

2 fred ho7%kd9

3 tom hom873J

4 mary modj8#