The Archives

  • 25.Aug.11
    Clearing the terminal screen cmd | rafacas | (0)
    Ctrl + l Clears the terminal screen.
  • 03.Dec.09
    screen: working with the scrollback buffer shell | rafacas | (0)
    screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. That is, multiple console applications can be run from the same terminal, each one with its own window. But we have already talked about the screen command before. In this post we are going to focus on the scrollback buffer feature. There is a scrollback history buffer for each virtual terminal, allowing to browse, or even to search, through the history of your windows. There is a copy-and-paste mechanism as well that allows moving text regions between windows. By default, the buffer has only ...
  • 24.Dec.08
    screen: a short list of commands shell | pfortuny | (0)
    Having already introduced screen in detail, I am now listing some specific commands. Recall that once a screen "session" is started, in order to get a screen command executed, you need to press C-a (that is, Ctrl and a) and then another key (C-a is the prefix for 'screen' and the other key is the specific command). To the point (notice that commands are case-sensitive): C-a c (we mentioned this one in the previous article): create a new screen (and give it the focus). C-a S: split the tty in "one part more". If a screen occupies the whole terminal, this command splits ...
  • 08.Nov.08
    Is this a tty? shell | pfortuny | (0)
    That is a funny question to ask if you are a human (because you *should* know the answer). But it is not that dumb for a system. As a matter of fact, among the multiple tests the shell admits (man 1 test), there is a -t which serves specifically for that: $ test -t 0 returns 0 (that is, success or true in shell jargon) if the standard input (file descriptor 0) is open and is associated with a terminal. So, unless things are going pretty bad, the following $ test -t 0 && echo $? Should always print a 0. However, when a file ...
  • 11.Oct.08
    screen… ttys as window managers (1) shell | pfortuny | (2)
    You either know it (in which case you probably will not bother to read on) or you must know it (and here I come to the rescue). Open your terminal of choice (in my OS X interface I press Command-0, which invokes quicksilver and then 'it <ret>', with which I get an iTerm instance). Then type $ screen and a help text appears, showing the usual GNU license text; press Return to continue. The screen blanks out as if you had just started your session. You are in, this is the red pill. You will never want out. Screen is a fully-featured 'terminal' window ...