Tail Command

Written on: November 15, 2022 10:57 am

What is the tail command?

The tail command is used to display the last n lines of a specified file.  By default the tail command displays the last 10 lines of a file.  This can be changed by using the -n argument and specifying a new value.  If the specified file does not contain at least n lines then a the .bak version of the file will be prepended, if it exists.

Another powerful feature of the tail command is its ability to monitor and display file changes in real-time.  The specified file in monitored for changes once a second and only the changed portion of the file is displayed.

How to Install tail

Below is an update project you can apply to your JNIOR to get the tail application.

Name Version Release Date Size MD5
Tail Command v1.0 Feb 20 2023 3.5 KB e0ce27e20c337000d8fd403c76b7ce80

Usage

tail [OPTION]... [FILE]...
Short OptionsLong OptionOption ValueDescription
-n–linesNUMBERThe number of lines that should be displayed from the end of the file
-f–followMonitor the file in real-time

Default Usage

The default usage will show the last 10 lines of the specified file.

Specify number of lines to show

We can use the -n or --lines option to specify 20 lines.

Update the file in real-time

Use -f or --follow to follow the file in real-time.  New entries will be displayed.  This command will not return to the prompt until ANY key is pressed.

By | Updated On May 8, 2023 4:01 pm | No Comments | Categories:


 

INTEG Process Group, inc. © 2023

Real-Time
Mon - Fri, 8am - 4pm EST
P: 724-933-9350
PureChat
Always Available
Contact Form
sales@integpg.com
support@integpg.com

@integpg
@jniordev