Learning Unix for OS X

Errata for Learning Unix for OS X

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Mobi
Page ~2122
Bulletpoint 4 under Disk Space Available with df

Referring to an /.vol, but there is no such thing in the df example output.

Note from the Author or Editor:
page 63, paragraph 2 should read "... tiny OS partitions like devfs to zero" omitting reference to "/.vol"

Stian Drøbak  Sep 08, 2012 
PDF, Other Digital Version
Page 5,6
"Finding hidden files" paragraph

The last sentence says that Fig 1-2 (page 6) shows a file name "myopen". The figure (screen capture) 1-2 doesn't show that file.

Note from the Author or Editor:
page 5: Remove reference to "and a file named myopen" from the final sentence of the paragraph that starts "You might not realize..."

Steve Jordi  Aug 23, 2012 
PDF
Page 21
Figure 2-4

On p.21, figure is labeled as Window Preferences, but figure shows Text preferences. Figure 2-3 on p. 20 shows Window preferences. Labeling of Figures in inconsistent with caps used for Preferences in 2-3 and lower case preferences in Figure 2-4.

Note from the Author or Editor:
Change caption of 2-4 to read "Terminal Preferences Settings: Text preferences"

Anonymous  Dec 31, 2012  Sep 26, 2013
PDF
Page 23
last paragraph

In the sentence "^\[ is the ASCII ESC character" there's an extra \ character. It should be "^[ is the ASCII ESC character".

Note from the Author or Editor:
Remove "\" from the reference to "^\["

Aurelio Jargas  Mar 15, 2013  Sep 26, 2013
PDF
Page 23
3rd paragraph

In the sentence "To type \^G, use Control-V Control-G" there's an extra \ character.

Note from the Author or Editor:
Correct. Remove the "\" in the sequence "\^G"

Aurelio Jargas  Mar 18, 2013  Sep 26, 2013
PDF
Page 40
2nd paragraph

When describing Control-C behaviour, it's told that *foreground* programs cannot be interrupted. The correct here is *background*. The incorrect word appears twice in this paragraph.

Note from the Author or Editor:
Correct. Replace "foreground" with "background" twice in para 2.

Aurelio Jargas  Mar 18, 2013  Sep 26, 2013
PDF
Page 46
1st example

There's an extra $ char at the end of the pwd output: "/Users/carol/Music$"

Note from the Author or Editor:
Formatting hiccup. Just remove the trailing "$"

Aurelio Jargas  Mar 20, 2013  Sep 26, 2013
Printed
Page 50
Figure 3-5

Put john's home directory instead carol's home directory. Just to be match the explanation.

Note from the Author or Editor:
Page 50, figure 3-5: the label "carol" should be replaced with "john".

Iván González Aguilar  Jan 04, 2013  Sep 26, 2013
PDF
Page 50
Figure 3-5

There are two repeated "carol" directories in the tree. The first should be "Users" instead.

Note from the Author or Editor:
Change first labeled box in the "tree" illustration on top of page 50 with the word "Users" (with capitalized "U").

Aurelio Jargas  Mar 20, 2013  Sep 26, 2013
PDF
Page 57
last paragraphs

In the explanation for figure 3-6, it's mentioned the "john" user. But in the figure "taylor" is shown as the user.

Note from the Author or Editor:
Both paragraphs 3 and 4 on page 57 should have "john" replaced with "taylor".

Aurelio Jargas  Mar 20, 2013  Sep 26, 2013
Printed
Page 59
Examples in "Calculating File Size and Disk Usage"

Both commands are expressed in 512 bytes blocks: du <some_file> ls -s <some_file> Perhaps, you have to set the BLOCK_SIZE to 1024 to make the result match to the book's explantation about command "du": "The size is reported in kilobytes".

Note from the Author or Editor:
Prose should say "... size is reported in 512-byte blocks, so Outline.doc is 150KB in size".

Iván González Aguilar  Jan 04, 2013  Sep 26, 2013
PDF
Page 67
last but one paragraph

It's mentioned the "Ownership & Permissions" area of the Finder's Get Info panel, but in Mountain Lion its name changed to "Sharing & Permissions".

Note from the Author or Editor:
Change as noted

Aurelio Jargas  Mar 20, 2013  Sep 26, 2013
PDF
Page 68
middle

"An easy way to change permissions on the working directory is by using its relative pathname, . (dot), as in chmod o-w." — At the end of the sentence, the dot from the chmod command is missing.

Note from the Author or Editor:
It's a spacing - formatting - issue. The command is correct, but should more obviously have a space prior to the trailing dot, as in: chmod o-w .

Aurelio Jargas  Mar 21, 2013  Sep 26, 2013
PDF
Page 69
3rd example

The 3rd example of this page is wrong (it's a copy/paste from the 2nd example): "list the filenames whose permissions you want to change, separated by spaces, as in: chmod ug=rw *" Instead of the asterisk, there should be something as "filename1 filename2 filename3"

Note from the Author or Editor:
Third example should be: chmod ug=rw filename1 filename2 filename3

Aurelio Jargas  Mar 21, 2013  Sep 26, 2013
PDF
Page 74
4th paragraph

"you can see that Mountain Lion actually points to /" -- it should be Macintosh HD instead Mountain Lion.

Aurelio Jargas  Mar 21, 2013  Sep 26, 2013
PDF
Page 83
2nd-to-last paragraph

"This output shows us that syslog.conf is three lines long, nfp.conf only has two lines, and ftpd.conf is also just two lines long." It's nfs.conf (not nfp) and it has three lines (not two).

Aurelio Jargas  Mar 22, 2013  Sep 26, 2013
PDF
Page 93
Figure 4-3

Figure 4-3 in page 93 is exactly the same as Figure 4-2 in page 91. But figure 4-3 should be different, because the screenshot was meant to show that the text was reformatted using the fmt command.

Aurelio Jargas  Mar 22, 2013  Sep 26, 2013
PDF
Page 99
last mkdir example

mkdir -p spy/{ch{01,02,03,04,05,intro,toc,index,bio}} The first pair of curly braces are not necessary and may confuse beginners. This is similar and cleaner: mkdir -p spy/ch{01,02,03,04,05,intro,toc,index,bio}

Aurelio Jargas  Mar 25, 2013  Sep 26, 2013
PDF
Page 107
1st example

There's an extra @ char in the ls -l output: lrwxr-xr-x 1 taylor taylor 18 8 May 08:40 neato-pic.pdf@ -> fig0403.pdf

Note from the Author or Editor:
I blame my "ls=ls -F" alias for that one. :-)

Aurelio Jargas  Mar 25, 2013  Sep 26, 2013
PDF
Page 107
2nd to last paragraph

The ZIP context menu in Mountain Lion's Finder is now called: Compress "filename" instead the old "Create Archive" mentioned in this paragraph.

Aurelio Jargas  Mar 25, 2013  Sep 26, 2013
PDF
Page 108
1st example

The ls output is corrupted in the timestamp part "24 8 May:52" $ ls -l ch06.doc.gz -rwxr-xr-x 1 taylor taylor 34206 24 8 May:52 ch06.doc.gz

Note from the Author or Editor:
Fix by editing output to show -rwxr-xr-x 1 taylor taylor 34206 24 8 May 08:52 ch06.doc.gz

Aurelio Jargas  Mar 22, 2013  Sep 26, 2013
PDF
Page 110
1st paragraph

"notice that we added the .gz suffix to avoid later confusion about the file type" It's mentioned the .gz suffix, but the example really uses .tgz.

Aurelio Jargas  Mar 25, 2013  Sep 26, 2013
PDF
Page 113
1st paragraph

The paragraph explanation used the month "Jan", but the mentioned previous example used the month "Aug" instead. Excerpt: $ ls -l | grep "Aug" ... In the previous search, a file named jan-finances.xls wouldn’t have matched, because by default grep is case-sensitive. That means your searches for “jan” wouldn’t match “Jan”, either.

Note from the Author or Editor:
Solution: Replace "jan" with "aug" and "Jan" with "Aug" in this particular paragraph to make it consistent with the previous paragraph.

Aurelio Jargas  Mar 26, 2013  Sep 26, 2013
PDF
Page 113
1st example

"To find all the files in the current directory that don’t mention Jane, for example, the command would be: $ grep -lv Jane * spread.xls Mike Report.doc $ " This example has many problems. 1) The files list in the grep output is always shown one-per-line, here they're shown as columns. 2) Showing .xls and .doc files in the results confuses the reader because one page ago you said that grep should not be used to search nontext files. 3) The most important: the command is wrong. It does not show files without the pattern, as stated, but it shows files that "at least one of its lines" does not match the pattern. So in fact, even files that mention the pattern will appear in the output. See: $ cat foo.txt Jane John $ grep -v Jane foo.txt John $ grep -lv Jane foo.txt foo.txt $

Note from the Author or Editor:
Correction to this errata is to have the command remain the same, and the prose prior to the command to remain the same (it's fine) but to have the example code itself read: $ grep -lv Jane * sample diary.txt myprogram.c That'll solve the problems mentioned above.

Aurelio Jargas  Mar 26, 2013  Sep 26, 2013
PDF
Page 115
Last paragraph

The regular expression "j[:lower:]ne" is wrong. It should be "j[[:lower:]]ne", with two brackets. The same mistake is repeated in page 116, 1st paragraph.

Note from the Author or Editor:
Both here on pg 115 and later on page 116, "[:lower:]" should be replaced with "[[:lower:]]"

Aurelio Jargas  Mar 13, 2013  Sep 26, 2013
PDF
Page 116
1st paragraph

The regular expression "^:digit:" is wrong. It should be "^[[:digit:]]", with two brackets.

Note from the Author or Editor:
Change ":digit:" to "[[:digit:]]"

Aurelio Jargas  Mar 13, 2013  Sep 26, 2013
PDF
Page 117
2nd example

The -E option is missing from the grep command. It's mentioned in the previous paragraph, and it should be used for the regex "POST.*(Safari|Firefox)" to be correctly interpreted.

Note from the Author or Editor:
Second example, "grep" should be "grep -E" (with a space between the "#" and the opening quote of the argument to this example command)

Aurelio Jargas  Mar 13, 2013  Sep 26, 2013
PDF
Page 117
1st example

In the first "grep POST access_log" example, the output contains 4 lines: Firefox, Firefox, Firefox, Safari. But in the next paragraph, it's described that the last line is "Google Chrome running on Windows". The Chrome's user agent ID indeed ends with the word Safari, but it's not clear in the example, since its lines were trimmed to fit the page width. The example should be untrimmed to show the "Chrome" string, or the paragraph must be changed to say "Safari" instead "Chrome" to avoid confusion.

Note from the Author or Editor:
Last sentence, paragraph 2, should not reference Chrome but instead read: "... and the last is Safari."

Aurelio Jargas  Mar 13, 2013  Sep 26, 2013
PDF
Page 126
middle of the page

The first find example in the page used -not -name "*gz" as a primary, but the following paragraph explained that it matches "all files whose names do not match the pattern *.gz." So, there's an extra dot in the *.gz pattern at the paragraph, or there's a missing dot at the find command. You choose :)

Note from the Author or Editor:
Need to add a dot to the "find" example to match the prose.

Aurelio Jargas  Mar 26, 2013  Sep 26, 2013
PDF
Page 127
3rd from last paragraph

"but if you don’t use it as ! the shell inevitably interprets it and generates some screwy error messages." -- I believe you meant \! instead !

Aurelio Jargas  Mar 26, 2013  Sep 26, 2013
PDF
Page 128
2nd to last paragraph

Just a silly filename mismatch between description and example: Here’s what the ls command has to say about the JPEG file Peanut.jpg: $ ls -l IMG_1912.JPG

Aurelio Jargas  Mar 26, 2013  Sep 26, 2013
PDF
Page 141
1st paragraph

"To achieve this, simply rename diary to something like older.diary, make a new diary file with today's entries, then append temp (with its old contents) to the new diary." "temp" must be changed to "older.diary" in the mentioned paragraph.

Note from the Author or Editor:
There's also a formatting mistake in this paragraph too: in the third sentence of the paragraph starting "Unix doesn't have" the words "make a new diary" should NOT be in italics.

Aurelio Jargas  Mar 27, 2013  Sep 26, 2013
PDF
Page 142
1st note

$HOME is missing from the note's example, since it improves the previous example which used $HOME (also the homedirlist.txt filename requires the ls to list the home dir, not the working dir). The full command should be: $ ls -l $HOME | colrm 1 30 > homedirlist.txt

Aurelio Jargas  Mar 27, 2013  Sep 26, 2013
PDF
Page 146
Table 6-1

"-k x ---- Ignore first x fields when sorting." I believe it's "Ignore first x-1 fields", because x is the field used for the sorting process.

Note from the Author or Editor:
Should be rephrased as "-k x ---- Start key at position x" to address this issue. Man page states it this way: -k, --key=POS1[,POS2] start a key at POS1, end it at POS2 (origin 1)

Aurelio Jargas  Mar 27, 2013  Sep 26, 2013
PDF
Page 147
last example

To make a real case insensitive filter, both sort and uniq must be flagged with the right options (sort -f, uniq -i). The -i option is missing for uniq in the example: tr -cs "[:alpha:]" "\n" < alice.txt | sort -f | uniq | wc -l

Aurelio Jargas  Mar 27, 2013  Sep 26, 2013