Best web design - Chapter 4 . Processing Text 177 Table 4-9

Chapter 4 . Processing Text 177 Table 4-9 Options Used with tail Option Use +NUMBER Specifies the NUMBER of lines from the beginning of the file to begin with when printing. –retry Instructs the utility to keep trying to open a file even if it is inaccessible. This option must be used with a name and will cause tail to retry even if the file doesn t exist. -c NUMBER Displays the last NUMBER of bytes specified. -f Specifies that tail should run in a loop so that appended data is displayed. This option is used with files that are growing in size because new data is being appended to the end. -n NUMBER Displays the last NUMBER of files specified. -q Specifies that headers are not to be displayed. -v Specifies that headers are to be displayed. –help Displays help information and then exits. –version Displays version information and then exits. -NUMBER Specifies the NUMBER of lines from the end of the file to begin with when printing. An example of the use of this utility is shown below. In this example the utility is used to display the last 50 bytes of the nameslist file. # tail -c 50 nameslist McCanta Joakim Erdfelt Pete Gizzi Neil Schroeder Joining multiple files The join utility actually searches both files for common entries. The entries found in both files are then displayed to stdoutwhere they can be redirected to a file. You can combine files using fields. The joinutility uses join fields to combine lines from multiple files. Before using the join utility, the files must be sorted on the join fields. This is often done by using the sortutility based on the fields that are to be joined. So, if you are utilizing two files that contain both first and last names and wish to join the files using last names, then the two files should first be sorted alphabetically using the last name field.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Leave a Reply