ECN No Name Newsletter: September, 1991

The ECN No Name Newsletter is no longer being published. This is an archived issue.

[previous article] [next article]

UNIX Timesavers

Marylou Marstellar

As a student and an employee of Production Unlimited (Purdue's temporary agency), I have been using UNIX for the last two years. Here are some commands that I have found to be worth remembering for everyday use, as well as a few timesavers to make your time with UNIX a little easier.

date
The date command will give you the date and time. This comes in very handy when you have forgotten (or don't own) a watch, and there is not a clock in sight.
mkdir
When you have a lot of projects to do during a semester, it is easy to lose track of which files are for what project. My suggestion is to make a new directory for each new project. Type "mkdir dir-name" to create a directory. Then, anytime you want to access files in that directory, type "cd dir-name" . To return to your home directory all you need to type is "cd" .
help
If you have a topic you want to know more about, you can type "help -k topic" . UNIX will give you a list of items pertaining to the topic.
man
Typing "man topic" will give you the manual page for the subject. This is helpful when you need to know options for a command, or when you are trying to learn to do something like send mail, or read news.
more
More is very helpful when you are viewing files on your terminal. By typing "cat file-name | more" you will be able to view the file contents one screen at a time. (This is MUCH easier than using Ctrl s to stop scrolling and Ctrl q to continue.)
! (csh only)
This exclamation point is known as bang. "!!" will repeat the last command at any point in the current line. "!$" will repeat the last word in the last command at any point in the current line. "!string" (for example, "!vi" ) will repeat the last occurrence of that pattern.
yy
When in vi, rather than retyping a line you have already typed, move the cursor to the line you wish to copy and type "yy" . Then move the cursor to the location where you want to place the copied line and type "p" . This will cause the copied line to be placed below the line where the cursor was sitting. Multiple lines can also be yanked. For example, typing "30yy" will yank 30 lines.
j,k,h,l
While in command mode when using the VI editor and you want to move around, it will be alot quicker to abandon the arrow keys and use j (down), k (up), h (left), and l (right). Your fingers are already there anyway!!


webmaster@ecn.purdue.edu
Last modified: Thursday, 23-Oct-97 18:45:24 EST

[HTML Check] HTML