ugh.book

(singke) #1

30 Welcome, New User!


next% mkdir foo
next% ls -Fd foo
foo/
next% rm foo/
rm: foo/ directory
next% rmdir foo/
rmdir: foo/: File exists

Here’s a way to amuse and delight your friends (courtesy of Leigh Klotz).
First, in great secret, do the following:
% mkdir foo
% touch foo/foo~

Then show your victim the results of these incantations:
% ls foo*
foo~
% rm foo~
rm: foo~ nonexistent
% rm foo*
rm: foo directory
% ls foo*
foo~
%

Last, for a really good time, try this:
% cat - - -

(Hint: press ctrl-D three times to get your prompt back!)

Online Documentation


People vote for president more often than they read printed documentation.
The only documentation that counts is the stuff that’s on-line, available at
the tap of a key or the click of a mouse. The state of Unix documentation,
and the amount by which it misses the bar, has earned its own chapter in
this book, so we’ll take this space just to point out that Unix’s man system
fails most where it is needed most: by novices.

Not all commands are created equal: some are programs invoked by a shell,
and some are built into a shell.^8 Some have their own man pages. Some
don’t. Unix expects you to know which is which. For example, wc, cp, and
ls are programs outside of the shell and have man pages. But fg, jobs, set,
Free download pdf