O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The fc Command

The fc command allows you to list, or edit and re-execute history file commands. It is the simplest interface to the command history file provided with the Korn shell. The fc command also allows you to manipulate the history file using your own choice of editors.

Displaying the Command History File

The command history file can be displayed using the fc command in a number of ways: with or without command numbers, using a range of line numbers, in reverse order, and more. The format for displaying the command history file with the fc –l command is:

						fc —l[nr] [range]
					

where the –n option causes the command numbers to not be displayed, and the –r option specifies reverse order (latest commands first). The range of commands to list ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required