Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
2 user(s) are online (1 user(s) are browsing encyclopedia)

Members: 0
Guests: 2

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Tail (Unix)

tail is a Computer program on Unix and Unix-like systems used to display the last few lines of a text Computer file or pipe (computing)d data. The command-syntax is:

tail [options]

By default, tail will print the last 10 lines of its input to the standard output. With command line options the number of lines printed and the printing units (lines, blocks or bytes) may be changed. The following example shows the last 20 lines of filename :

tail -20 filename

This displays the last 15 bytes of all files starting with foo :

tail -15c foo*

=File monitoring=

tail has a special command line option -f (follow) that allows a file to be monitored. Instead of displaying the last few lines and exiting, tail displays the lines and then monitors the file. As new lines are added to the file by another Process#Computing, tail updates the display. This is particularly useful for monitoring log files. The following command will display the last 10 lines of messages and append new lines to the display as new lines are added to messages :

tail -f /var/adm/messages

To interrupt tail while it is monitoring, break-in with CTRL-C.

=See also=

*head (Unix)

= External links =

  • [http://www.gnu.org/software/coreutils/manual/html_mono/coreutils.html#SEC19 GNU Project documentation for tail]
  • [http://www.freebsd.org/cgi/man.cgiquery=tail&apropos=0&sektion=0&manpath=FreeBSD+5.3-RELEASE+and+Ports&format=html FreeBSD documentation for tail]