home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 50.11 Writing a Simple Man Page with the -man Macros Chapter 50
Help--Online Documentation, etc.
Next: 51. Miscellaneous Useful Programs and Curiosities
 

50.12 Common UNIX Error Messages

For new UNIX users, one common frustration is that error messages are often nonexistent, usually terse, and often extremely obscure. Something like Command not found is reasonably self-explanatory, most of the time; but what about You don't exist. Go away. ?

Here, I cover some of the more common, obscure, or amusing messages that are around [or were around. Many versions of UNIX have been "sanitized." Instead of "Intruder alert!," for example, SunOS 4.1.3 says "no login associated with uid num ." Pity. :-) -JP  ]. I'll try to keep it brief, which means that it will be far from comprehensive. A complete list of all the messages you might get could easily fill a book - and lots of the messages report situations that you'd have to try very hard to reconstruct.

arguments too long

UNIX has an unfortunate limit to the maximum length (in characters) of all arguments you can put on the command line. This limit was originally fairly small; in the past few years, it's become quite large (5120 characters on SVR4), but no one has yet fixed the basic problem. So if you give a command like ls  /*/*/*/* ( 15.1 ) , you're very likely to find out that your argument list is too long. Workarounds for this problem are discussed in articles 9.21 and 9.23 .

awk: bailing out near line n

You're running an awk ( 33.11 ) script that has a syntax error. The standard awk is incredibly uninformative about syntax errors; this is all the help you're likely to get. Newer versions (like nawk and gawk ( 33.12 ) ) have more intelligent error messages.

bad magic number

You're most likely to get this message when you give a UNIX command. You can also get this message from programs like ld , the link editor for programmers. A "magic number" is a special number in an executable file that tells the kernel what kind of file it's dealing with. If you get this message, the file you're trying to execute may have been corrupted; or it may be an executable for another kind of computer; or it may not be an executable file at all.

broken pipe

This message appears when you're running a pipeline, and one part of the pipeline terminates before the rest. For example, say you're running the command:

% 

ls -l | more

If the more program quits (for any reason, like using its "quit" command) before it has read all the data from ls , you have a "broken pipe."

bus error (core dumped)

This is similar in nature to a segmentation fault. There's a subtle difference in that a "bus error" means that the kernel didn't detect the problem on its own; the memory system (i.e., hardware) realized that there was a problem. On many UNIX systems, this message can mean that you're trying to do an I/O operation incorrectly - you may be trying to access a device that doesn't exist, or something of that nature. What does I/O have to do with memory? A lot, but that's beyond the bounds of this book.

somecmd : command not found

You probably either misspelled the name of the command or it isn't in your search path ( 8.7 ) . The more insidious form of this error happens when you're writing a script for the shell, Perl, awk , etc. with the #! notation ( 45.3 ) . You double-check the command name and your path; which ( 50.8 ) tells you the command can be found. The trouble is probably an incorrect pathname for the interpreter, like #!/bin/hs for an sh script.

cross-device link

You attempted to create a hard link to a file on another filesystem. Try a symbolic link ( 18.4 ) instead.

directory not empty

You tried to delete a directory that's not empty, and rmdir won't let you. The solution is simple enough; but often, when you try to list the directory, it will look empty. Did you check for "invisible" filenames ( 16.11 ) (most likely, filenames beginning with a dot)? There are probably a few "turds" left over from some editing session. If you're absolutely sure that none of these invisible files are meaningful, just use rm -rf ( 23.10 , 23.17 ) .

intruder alert!

Comes from whoami , and means that whoami can't look you up in the /etc/passwd ( 36.3 ) file. This probably means that someone managed to delete or corrupt /etc/passwd .

make: must be a separator on rules line 46

The bane of everyone who uses make ( 28.13 ) . make 's "rules" lines must begin with a TAB character. Spaces are not acceptable. This means that you used spaces, rather than a tab. Some editors (and reportedly, even some networks) will change tabs to spaces automatically - so even if you've been careful to observe the rule, you may still run across this message.

not a typewriter

As someone on the Net said, "Damn right, this isn't a typewriter. That's a problem?" Seriously, though: this is an obsolete message that still crops up occasionally. It means that the program attempted to perform some I/O operation that would be legal on a terminal, except that it wasn't writing to a terminal: it was writing to a file, or to a pipe, etc.

not enough memory

There isn't enough swap space ( 52.9 ) to run your program. Note that many modern UNIX systems allow the system administrator to create new "swapping files"; this may help you to work around the problem without reconfiguring a disk drive. Under SunOS, for example, you'd use the mkfile and swapon commands to solve this problem.

segmentation fault (core dumped)

A segmentation fault means that the program you're running attempted to read or write some address in memory that wasn't assigned to it. If it's a program that you wrote, a segmentation fault probably means that a pointer is pointing to something strange. If it's a standard UNIX utility, well - it really means the same thing (not that it helps). Most likely, though, you've given the program strange input - the input may be illegal, there may be more than the program can handle, etc.

typesetter busy

I've seen this when using troff ( 43.12 ) ; it usually means that you haven't specified the output device correctly; i.e., that you haven't used the -t option, which sends the output to standard output, for post-processing by some translator. Actually, it's very rare for a user to invoke troff directly. troff is usually run through some kind of a shell script. If you see this message, the shell script is doing the wrong thing. What does the message really mean? Simple. troff , on its own, generates output for a C/A/T phototypesetter. These typesetters were obsolete 10 or 15 years ago, and are now probably all rusting in junk heaps. But nobody bothered to change troff . If you don't include the -t option, troff tries to send the output to the typesetter; when it fails (because the typesetter doesn't exist), troff decides that the typesetter must be "busy."

who are you?

Comes from lpr ( 43.2 ) , and means that lpr can't look you up in the /etc/passwd ( 36.3 ) file. This probably means that someone managed to delete or corrupt /etc/passwd .

you don't exist. Go away.

I've never actually seen this message, though it's part of the UNIX mythology. Reportedly, it can come from the talk ( 1.33 ) program when you try to talk from a tty or (usually) a pty ( 41.8 ) that isn't in the list of logged-in users, /etc/utmp . One of our readers got the message as he tried to reboot his computer after accidentally removing the root entry in /etc/passwd 8-( .

While a lot of the error messages are more-or-less standard, a lot of them vary from vendor to vendor; some vendors have tried to protect you from the worst abuse. I hope that all systems incorporating the legendary "Don't you hate obscure messages" error message long since disappeared.

- ML


Previous: 50.11 Writing a Simple Man Page with the -man Macros UNIX Power Tools Next: 51. Miscellaneous Useful Programs and Curiosities
50.11 Writing a Simple Man Page with the -man Macros Book Index 51. Miscellaneous Useful Programs and Curiosities

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System