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

Searching and Sorting

You can use the following tools to search and sort files.

egrep

An extended version of grep.

fgrep

A tool that searches files for literal words.

find

A utility that searches the system for filenames.

grep

A tool that searches files for text patterns.

locate

A faster version of find; however, it depends on a database that is periodically updated by the weekly cron job in /etc/weekly. If the database is out of date, find will be more accurate.

sort

A tool that sorts a file (use -n for numeric sorting, -u to eliminate duplicates).

strings

A tool that searches binary files for text patterns.

uniq

A utility that reports or filters duplicate lines in a file.

zgrep

A tool that searches compressed files for text patterns.

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