Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Name

history

Synopsis

                     history [options]

Display the list of history events. (History syntax is discussed earlier in “Command History.”)

Options

-c

tcsh only. Clear history list.

-h

Print history list without event numbers.

-r

Print in reverse order; show oldest commands last.

n

Display only the last n history commands, instead of the number set by the history shell variable.

-L file

tcsh only. Load series of pushd and popd commands from file in order to re-create a saved stack.

-M file

tcsh only. Merge the current directory stack and the stack saved in file. Save both, sorted by time, in file, as a series of pushd and popd commands.

-S file

tcsh only. Print to file a series of pushd and popd commands that can be invoked to replicate the stack.

Example

To save and execute the last five commands:

                     history -h 5 > do_it
                     source do_it
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 Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata