Skip to Main Content
Mac OS X for Unix Geeks
book

Mac OS X for Unix Geeks

by Ernest E. Rothman, Brian Jepson
September 2002
Beginner to intermediate content levelBeginner to intermediate
216 pages
7h 43m
English
O'Reilly Media, Inc.
Content preview from Mac OS X for Unix Geeks

Working with Files and Directories

You can use the following tools to compare, copy, and examine files.

cat

Concatenates and displays files.

cd

Changes directory.

chflags

Changes file flags.

chmod

Changes access modes on files.

cmp

Compares two files, byte by byte.

comm

Compares two sorted files.

cp

Copies files.

diff

Compares two files, line by line.

diff3

Compares three files.

file

Determines a file’s type.

head

Shows the first few lines of a file.

less

Serves as an enhanced alternative to more.

ln

Creates symbolic or hard links.

Tip

Symbolic and hard links are not the same as Carbon aliases that you create in the Finder (File Make Alias). Unix programs cannot follow Carbon aliases, but all Mac OS X applications (Carbon, Cocoa, Classic, and Unix) can follow symbolic or hard links.

ls

Lists files or directories.

mkdir

Makes a new directory.

more

Displays files one screen at a time.

mv

Moves or renames files or directories.

patch

Merges a set of changes into a file.

pwd

Prints the working directory.

rcp

Insecurely copies a file to or from a remote machine. Use scp instead.

rm

Removes files.

rmdir

Removes directories.

scp

Secures alternative to rcp.

sdiff

Compares two files, side-by-side and line-by-line.

split

Splits files evenly.

tail

Shows the last few lines of a file.

vis

Displays nonprinting characters in a readable form.

unvis

Restores the output of vis to its original form.

wc

Counts lines, words, and characters.

zcmp

Compares two compressed ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X For Unix Geeks, 4th Edition

Mac OS X For Unix Geeks, 4th Edition

Ernest E. Rothman, Rich Rosen, Brian Jepson
Mac OS X Hacks

Mac OS X Hacks

Kevin Hemenway, Rael Dornfest
Mac OS X in a Nutshell

Mac OS X in a Nutshell

Jason McIntosh, Chuck Toporek, Chris Stone

Publisher Resources

ISBN: 0596003560Errata Page