Linux/Unix Tips and Tricks

Whether youíre a newbie to Linux or you are a seasoned guru, youíre bound to find some scripts or programs which just make your life on the computer exponentially easier. The following is a list of them and explains what they do.

1. tac

tac is a command similar to cat, except that it reverses the output of the specified file.

tac <file name>

2. Multiple X-Sessions

Using multiple X-Sessions allows a user to have open more than just one instance of XFree, so multiple desktop environments can be used at a time.

startx -- :<terminal name>

terminal name is simply which terminal X should start on. By default it starts on

0:0. If you want two open, you may want it open on 0:1, which can be run by:

startx -- :1

The resulting desktops will exist on F7 - F12.

3. SSH

SSH is a telnet replacement which includes encryption for higher security.

ssh -l <username> <hostname>

<username> is the name, specified in /etc/passwd, that you want to login as. Remove the -l <username> for anonymous.

<hostname> is simply the hostname or IP address of the computer to connect to.

4. links

links is a text based browser which has full support for tables

links <hostname>

<hostname> is simply the hostname or IP address of the computer to connect to.

5. Gkrellm

Gkrellm is a graphical application that displays system information in real-time. It displays everything from processor consumption to if new email exists in that specific

userís inbox.

6. Keybindings

Keybindings allow a user to to run a certain program or command by hitting only a small keycombo.

In Sawfish, click on the Keybindings capplet and select your keybindings by adding a new one, selecting the command, and then select the desired keybinding.

7. more

more causes any info sent to the terminal after more than one page has been output. This allows the user to see a page at a time, taking their time on each page, without them having to worry about the text rolling off the screen.

more can be used as a straight program to view a file or can be piped to by any other applications

Note: an alternative to more is less

8. grep

grep is a command that allows the user to specify text to show on the screen and display only the line containing the quered string.

| grep string

9. wc

Utility to print basic formatting information about a file.

wc <filename> or wc can be piped to

10. find

A simple utility made to search your hard disk.

find <path> <expression>

11. locate

A quick alternative to find

locate <expression>