Philip Rowlands wrote: > Re-adding [email protected] so replies go in the list archives. > On Fri, 14 Sep 2007, [EMAIL PROTECTED] wrote: > >ok head is written for ascII file. > >when i try open an other type file, my shell bugs.
Try using file pagers such as 'more', 'less', or 'most'. A recommended pager is the 'less' program. Pagers and other file browsers know about termainals and handle binary input in a reasonable way. less ls.pdf Additionally to view pdf files as text files the 'pdf2text' program is very useful. Also the less program may be configured to run the pdf2text program automatically on *.pdf files and the result viewed in a pager. This is a very convenient combination. > >when i tape ls after the command head (try my example), the display is > >not correct. I am to oblige to close Shell and to start again it to > >return to the normal one. > > Yes, by writing binary (control) characters to the terminal, it may > become unreadable. There are measures you can take to fix this, > depending on the terminal; for example, the standard xterm has a "Do > Full Reset" command on the VT options menu. Other terminals or terminal > emulators may have similar, or if not then (on my computer) the "reset" > program from the ncurses package usually works. In a standard xterm this is control-middle-button then select the menu entry "Do Full Reset". This will return the terminal to a usable state. This same issue exists with raw output of any binary file directly to the terminal. It would be the same with 'cat' too for example. This is not a problem with cat, head, tail, etc. Effectively the terminal has been instructed by the escape sequences in the file to take an action or to change a configuration. It is simply doing exactly what it is being told to do. Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
