From 31483837fcc764c93cc953d1253594a7375540b1 Mon Sep 17 00:00:00 2001 From: Petr Pisar Date: Thu, 15 Sep 2011 05:02:52 +0200 Subject: [PATCH] console_codes.4: Add ESC [ 3 J Linux 3.0 (commit f8df13e0a901fe55631fed66562369b4dba40f8b) implements \E[3J to allow scrambling content of console including scroll-back buffer (http://thread.gmane.org/gmane.linux.kernel/1125792). This is useful at terminal lock to disallow attacker to scroll visible window back and to see sensitive data. Other \E[J sequences do not blank history. \E[3J is superset of \E[2J. In other words, it clears visible screen too. Signed-off-by: Michael Kerrisk --- man4/console_codes.4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/man4/console_codes.4 b/man4/console_codes.4 index 2a806b7b3..d939dc3e3 100644 --- a/man4/console_codes.4 +++ b/man4/console_codes.4 @@ -18,7 +18,7 @@ .\" .\" 2006-05-27, Several corrections - Thomas E. Dickey .\" -.TH CONSOLE_CODES 4 2008-01-01 "Linux" "Linux Programmer's Manual" +.TH CONSOLE_CODES 4 2011-09-15 "Linux" "Linux Programmer's Manual" .SH NAME console_codes \- Linux console escape and control sequences .SH DESCRIPTION @@ -175,7 +175,7 @@ and this entire sequence is ignored. .PP The action of a CSI sequence is determined by its final character. .TS -l l l. +l l l l. @ ICH Insert the indicated # of blank characters. A CUU Move cursor up the indicated # of rows. B CUD Move cursor down the indicated # of rows. @@ -188,6 +188,9 @@ H CUP Move cursor to the indicated row, column (origin at 1,1). J ED Erase display (default: from cursor to end of display). ESC [ 1 J: erase from start to cursor. ESC [ 2 J: erase whole display. + ESC [ 3 J: erase whole display including scroll-back + buffer (since Linux 3.0). +.\" ESC [ 3 J: commit f8df13e0a901fe55631fed66562369b4dba40f8b K EL Erase line (default: from cursor to end of line). ESC [ 1 K: erase from start of line to cursor. ESC [ 2 K: erase whole line.