www.linode.com Open in urlscan Pro
2a02:26f0:2100::58dd:c471  Public Scan

Submitted URL: https://www.linode.com/docs/quick-answers/linux/how-to-use-tail/
Effective URL: https://www.linode.com/docs/guides/how-to-use-tail/
Submission: On May 15 via api from US — Scanned from DE

Form analysis 3 forms found in the DOM

GET https://www.linode.com

<form role="search" method="get" action="https://www.linode.com" class="c-search"><label for="s">Search</label>
  <input type="search" placeholder="Search Linode" name="s" id="s-mobilenav">
  <input type="submit" value="Search">
</form>

https://login.linode.com/signup

<form :action="signupURL(false)" data-turbo="false" action="https://login.linode.com/signup"><input type="hidden" name="promo" :value="promoCode()" value="docs080123">
  <button @click="$store.nav.analytics.handler.convertObject(document.body.dataset.objectid, 'DOCS: Promo Code')" type="submit" formtarget="_blank"
    class="bg-transparent hover:bg-gray-800 text-white text-md font-semibold py-2 px-4 border border-white hover:border-gray-800 rounded"> Sign Up</button>
</form>

POST https://delighted.com/t/KGQxrivu?referrer=%2Fdocs%2Fguides%2Fhow-to-use-tail%2F

<form data-turbo="false" x-data="{}" :action="'https://delighted.com/t/KGQxrivu?referrer=' + encodeURIComponent(window.location.pathname)" method="post" target="_blank" novalidate=""
  action="https://delighted.com/t/KGQxrivu?referrer=%2Fdocs%2Fguides%2Fhow-to-use-tail%2F">
  <div class="flex flex-col items-center">
    <h2 id="delighted" data-toc-ignore="">Your Feedback Is Important</h2>
    <p class="text-base text-titlecolor md:text-lg mb-6 mt-2 text-center">Let us know if this guide was helpful to you.</p><button type="submit" @click="$store.nav.analytics.handler.convertObject(document.body.dataset.objectid, 'DOCS: Feedback')"
      class="btn p-4 rounded-md border-2 border-gray-400 hover:border-brand hover:text-brand text-sm sm:text-lg" value="Feedback" name="feedback"> Provide Feedback</button>
  </div>
</form>

Text Content

We’re working on integrating Linode and Akamai. Learn more.
 * Search
 * Partners
 * Docs
 * Support
 * Sales
 * Careers
 * Log In

English
   
 * English
 * Español

 * Why Choose Us
 * Products
 * Industries
 * Marketplace
 * Pricing
 * Community
 * Sign Up
 * Mobile

 * Why Choose Us
   * Why Choose Us
   * Global Infrastructure
   * Cloud Simplified
   * Predictable Pricing
   * Support Experience
   * Free Bundled Services
   * Customer Stories
   * Cloud for Business
   * Our Approach
   * What is Cloud Computing?
 * Products
   * Products Overview
   * Compute
     * Dedicated CPU
     * Shared CPU
     * High Memory
     * Premium CPU
     * GPU
     * Kubernetes
     * EdgeWorkers
   * Storage
     * Block Storage
     * Object Storage
     * Backups
   * Databases
     * Managed Databases
   * Services
     * Managed
   * Networking
     * Cloud Firewall
     * DDoS Protection
     * DNS Manager
     * NodeBalancers
     * Private Networking
   * Developer Tools
     * Cloud Manager
     * API
     * CLI
     * Terraform Provider
     * Ansible Collection
     * Images
     * Integrations
     * StackScripts
     * Monitoring
     * Users & Permissions
   * Delivery
     * Adaptive Media Delivery
     * Download Delivery
     * Ion
     * Global Traffic
   * Security
     * Guardicore
     * Kona Site Defender
     * App & API Protector
     * Bot Manager
     * Account Protector
     * EAA
 * Industries
   * Digital Agencies
   * Ecommerce
   * Education
   * Gaming
   * Managed Hosting
   * Media
   * SaaS
 * Marketplace
   * Browse Marketplace
   * Submit Marketplace App
 * Pricing
   * Pricing List
   * Cloud Estimator
   * Cloud Computing Calculator
 * Community
   * Community Overview
   * Q&A
   * Developer Portal
   * Beta Program
   * Customer Referral Program
   * Partner Program
   * Startup Programs
   * Blog
   * Content Resources
   * Events
   * Newsletter
   * Distributions
   * Kernels
 * Company
   * About Us
   * Newsroom
   * Careers
   * Legal
   * Sales
   * System Status

 * Search
 * Docs
 * Blog
 * Resources
 * Pricing
 * Partners
 * Support
 * Sales

Search
 * Log In
 * Sign Up

FEATURED

Hero Forge
Secure, Accessible GPU Instances
Unleash Millions of Adventurers
Read Story
 * Why Choose Us
 * Global Infrastructure
 * Cloud Simplified
 * Predictable Pricing
 * Support Experience
 * Free Bundled Services

 * About Us
 * Customer Stories
 * Cloud for Business
 * Our Approach
 * What is Cloud Computing?

FEATURED

Free Bundled Services
Discover our no-cost security, networking,
maintenance, and monitoring solutions.
Learn More
View All Products

COMPUTE

 * Dedicated CPU
 * Shared CPU
 * High Memory
 * Premium CPU
 * GPU
 * Kubernetes
 * EdgeWorkers

STORAGE

 * Block Storage
 * Object Storage
 * Backups

DATABASES

 * Managed Databases

NETWORKING

 * Cloud Firewall
 * DDoS Protection
 * DNS Manager
 * NodeBalancers
 * Private Networking

DEVELOPER TOOLS

 * Cloud Manager
 * API
 * CLI
 * Terraform Provider
 * Ansible Collection
 * Images
 * Integrations
 * StackScripts
 * Monitoring
 * Users & Permissions

DELIVERY

 * Adaptive Media Delivery
 * Download Delivery
 * Ion
 * Global Traffic

SECURITY

 * Guardicore
 * Kona Site Defender
 * App & API Protector
 * Bot Manager
 * Account Protector
 * EAA

SERVICES

 * Managed

FEATURED

Portability in the Cloud
Best Practices for Building SaaS-Based Applications
Get Your Copy

INDUSTRIES

 * Digital Agencies
 * Ecommerce
 * Education
 * Gaming
 * Managed Hosting
 * Media
 * SaaS

FEATURED

Cloud Computing Calculator
Estimate your cloud costs. Price and configure cloud features to match your
needs.
Launch Calculator

PRICING

 * Pricing List
 * Cloud Estimator
 * Cloud Computing Calculator

FREE EBOOK

Try IAC by Justin Mitchel
A step-by-step IAC guide for Terraform,
Ansible, Puppet, Chef, and Salt
Download

COMMUNITY

 * Overview
 * Q&A
 * Developer Portal
 * Beta Program
 * Customer Referral Program
 * Partner Program
 * Startup Programs

ENGAGE WITH US

 * Blog
 * Content Resources
 * Events
 * Newsletter
 * Newsroom
 * Find a Partner

Explore docs

 1. Docs Home
 2. Guides
 3. Quick Answers
 4. Linux
 5. 

 * On this page
   On this page
   
   
   
   
   


ON THIS PAGE


Filtered by search term
   
   
 * 
   Products
   423
   
   
   
 * 
   Cloud Guides & Tutorials
   1760
   
   
   
      
      
    * 
      Akamai + Linode
      4
      
      
      
    * 
      Applications
      229
      
      
      
    * 
      Databases
      193
      
      
      
    * 
      Development
      295
      
      
      
    * 
      Email Server Guides
      69
      
      
      
    * 
      Game Servers
      25
      
      
      
    * 
      IPs, Networking & Domains
      72
      
      
      
    * 
      Kubernetes
      62
      
      
      
    * 
      Linode Platform
      19
      
      
      
    * 
      Quick Answers
      63
      
      
      
         
         
       * 
         Linode Platform
         5
         
         
         
       * 
         Linux
         43
         
         
         
            
            
          * 
            SSH Customization Tricks
            
          * 
            Mount an SMB Share in Linux
            
          * 
            Quick Guide to the Linux Dump and Restore Commands
            
          * 
            Quick Guide to the Linux Mount Command
            
          * 
            Add a Directory to the PATH on Linux
            
          * 
            Install SELinux on Ubuntu 22.04
            
          * 
            Using e2fsck to Find and Repair Disk Errors On ext File Systems
            
          * 
            Linux vs. Windows: What’s the Difference?
            
          * 
            10 Benefits of Linux You Need to Know
            
          * 
            Open Source vs. Closed Source: What’s the Difference?
            
          * 
            What are the Advantages of Open Source Software?
            
          * 
            What is Open Source Software?
            
          * 
            Use GNU Make to Automate Tasks
            
          * 
            Troubleshoot SSH Key Authentication Issues
            
          * 
            Use the xargs Command
            
          * 
            Using the echo Command
            
          * 
            Using the ps aux Command in Linux
            
          * 
            Adding the Linux alias Command in the .bashrc File
            
          * 
            Using the Linux alias Command
            
          * 
            Using the cd Command to Navigate the Terminal
            
          * 
            Install SELinux on Debian 10
            
          * 
            How to Use the Less Command
            
          * 
            Use journalctl to View Your System's Logs
            
          * 
            Alias Frequently Used Commands in Linux
            
          * 
            Use rm to Delete Files and Directories on Linux
            
          * 
            Install Drupal with Docker Compose
            
          * 
            Install WordPress with Docker Compose
            
          * 
            Use systemd to Start a Linux Service at Boot
            
          * 
            How to use fsck - Quick Answer
            
          * 
            Using fsck to Find and Repair Disk Errors and Bad Sectors
            
          * 
            Find and Terminate Processes from the Linux or Mac OS Command Line
            
          * 
            Archive, Compress, and Extract Files in Linux Using the Command Line
            
          * 
            How to Install, Configure and Run the Fish Shell
            
          * 
            Install SELinux on Ubuntu 18.04
            
          * 
            Changing SELinux Modes
            
          * 
            How to Use Git the Version Control System
            
          * 
            How to Use Wget
            
          * 
            Log in to CoreOS Container Linux
            
          * 
            Use nano to Edit Files in Linux
            
          * 
            Linux Command Line Tips
            
          * 
            How to Use the Head Command
            
          * 
            How to Use the Tail Command
            
          * 
            Using the grep Command in Linux: Finding Text & Strings in Files
            
      
       * 
         Linux Essentials
         11
         
         
         
       * 
         Websites
         4
         
         
         
   
    * 
      Security, Upgrades & Backups
      159
      
      
      
    * 
      Tools & Reference
      122
      
      
      
    * 
      Uptime & Analytics
      61
      
      
      
    * 
      Web Server Guides
      222
      
      
      
    * 
      Website Guides
      164
      
      
      

 * 
   API
   368
   
   
   
 * 
   Reference Architecture
   9
   
   
   
 * 
   Marketplace
   121
   
   
   
 * 
   Blog
   630
   
   
   
 * 
   Resources
   653
   
   
   


 1. Docs Home
 2. 

List Sections Tiles


SEARCH RESULTS

 results matching 

 results


NO RESULTS








Previous Next


FILTERS

Filters ( )

All


Add tags


All


Add authors


All

 1. Docs Home
 2. Guides
 3. Quick Answers
 4. Linux
 5. 


HOW TO USE THE TAIL COMMAND

Published April 10, 2017 by Phil Zona
 * Report an Issue
 * View File
 * Edit File

 * Share on Twitter
 * Share on Facebook
 * Share on Hacker News

> Traducciones al Español
> Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que
> usted esté viendo una traducción generada automáticamente. Estamos trabajando
> con traductores profesionales para verificar las traducciones de nuestro sitio
> web. Este proyecto es un trabajo en curso.

Create a Linode account to try this guide with a $100 credit.
This credit will be applied to any valid services used during your first
60 days.
Sign Up

In this guide, you’ll learn how to use the tail command. Using tail is a simple
way to show the ends of files, for example, when analyzing logs and other text
files that change over time. It may also be combined with other tools for
selective, real-time monitoring. When performing administrative tasks on your
Linode, tail is one of the most useful tools available.

 1. Enter the tail command, followed by the file you’d like to view:
    
    tail /var/log/auth.log
    
    
    This will print the last ten lines of the /var/log/auth.log file to your
    terminal output.

 2. To change the number of lines displayed, use the -n option:
    
    tail -n 50 /var/log/auth.log
    
    
    In this example, the last 50 lines will be shown, but you can modify this
    number to show as many or as few lines as you need.

 3. To show a real-time, streaming output of a changing file, use the -f or
    --follow options:
    
    tail -f /var/log/auth.log
    
    
    This will print the end of the file to your screen, and update it as the
    file changes. For example, you can use this option with /var/log/auth.log
    (on Debian and Ubuntu systems) to show your access log in real time. This
    will run as a foreground process, so to cancel it, press CTRL+C.

 4. Tail can even be combined with other tools like grep to filter the results:
    
    tail /var/log/auth.log | grep 198.51.100.1
    
    
    This command would search the last ten lines of your access log and only
    display those that contain the IP address 198.51.100.1. You can also apply
    options to tail in order to show more or less lines, view the filtered
    results in real time, and more.

These are just the basics of how to use tail. It is an incredibly useful tool
with many more options than we’ve listed here. To learn more advanced
techniques, please check out our full guide on the tail command.

This page was originally published on April 10, 2017.

linux
 * Report an Issue
 * View File
 * Edit File

 * Share on Twitter
 * Share on Facebook
 * Share on Hacker News

--------------------------------------------------------------------------------


YOUR FEEDBACK IS IMPORTANT

Let us know if this guide was helpful to you.

Provide Feedback

--------------------------------------------------------------------------------

Join the conversation.
Read other comments or post your own below. Comments must be respectful,
constructive, and relevant to the topic of the guide. Do not post external links
or advertisements. Before posting, consider if your comment would be better
addressed by contacting our Support team or asking on our Community Site.
The Disqus commenting system for Linode Docs requires the acceptance of
Functional Cookies, which allow us to analyze site usage so we can measure and
improve performance. To view and create comments for this article, please update
your Cookie Preferences on this website and refresh this web page. Please note:
You must have JavaScript enabled in your browser.

Please enable JavaScript to view the <a
href=http://disqus.com/?ref_noscript>comments powered by Disqus.</a>comments
powered by Disqus


ON THIS PAGE


© 2003-2024 Linode LLC.
All rights reserved.
Cookie Preferences

 * Site Map
 * Support
 * Partners
 * Accessibility Commitment
 * Legal Center
 * System Status

WHY CHOOSE US

 * Why Choose Us
 * Global Infrastructure
 * Cloud Simplified
 * Predictable Pricing
 * Support Experience
 * Free Bundled Services
 * Customer Stories
 * Cloud for Business
 * Our Approach
 * What is Cloud Computing?

COMPANY

 * About
 * Accessibility Commitment
 * Partners
 * Legal

PRODUCTS

 * Products Overview
 * Dedicated CPU
 * Shared CPU
 * High Memory
 * Premium CPU
 * GPU
 * Kubernetes
 * Block Storage
 * Object Storage
 * Backups
 * Managed Databases
 * Cloud Firewall
 * DDoS Protection
 * DNS Manager
 * NodeBalancers
 * Private Networking
 * Managed
 * Cloud Manager
 * API
 * CLI
 * Terraform Provider
 * Ansible Collection

INDUSTRIES

 * Digital Agencies
 * Ecommerce
 * Education
 * Gaming
 * Managed Hosting
 * Media
 * SaaS

MARKETPLACE

 * Browse Marketplace
 * Submit Marketplace App

PRICING

 * Pricing List
 * Cloud Estimator
 * Cloud Computing Calculator

COMMUNITY

 * Community Overview
 * Q&A
 * Developer Portal
 * Beta Program
 * Customer Referral Program
 * Partner Program
 * Startup Programs
 * Blog
 * Content Resources
 * Events
 * Distributions
 * Kernels

CONTACT

 * Support
 * System Status
 * Log in

FOLLOW US

 * Twitter
 * YouTube
 * LinkedIn
 * GitHub