{"id":59114,"date":"2023-11-28T15:01:44","date_gmt":"2023-11-28T07:01:44","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=59114"},"modified":"2023-11-26T18:19:32","modified_gmt":"2023-11-26T10:19:32","slug":"linux-command-tail","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/","title":{"rendered":"How to Use the Tail Command in Linux"},"content":{"rendered":"<p>The <code>tail<\/code> command stands for \u201ctail of the file,\u201d and as the name suggests, it\u2019s primarily used to view the last part of files. Whether you\u2019re monitoring log files or tracking real-time data changes, <code>tail<\/code> is your go-to utility.<\/p>\n<p>The command is often used in conjunction with other Linux commands like <code><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-grep\/\">grep<\/a><\/code> for searching, <code>awk<\/code> for text processing, and <code>|<\/code> (pipe) for chaining multiple commands together. For example, you might use <code>tail -f \/var\/log\/syslog | grep \"error\"<\/code> to monitor system logs for errors in real-time.<\/p>\n<p>General syntax for <code>tail<\/code> command:<\/p>\n<pre>\r\n$ tail [OPTION...] [FILE...]\r\n<\/pre>\n<hr>\n<h3>1. Display the exact number of lines<\/h3>\n<pre>tail -n [number] [file]<\/pre>\n<p>Using this option allows you to get the <code>tail<\/code> command to produce output that will display a certain number of lines in a file.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Suppose you have a text file named <code>example.txt<\/code> with the following content:<\/p>\n<pre>Line 1: This is the first line.\r\nLine 2: This is the second line.\r\nLine 3: This is the third line.\r\nLine 4: This is the fourth line.\r\nLine 5: This is the fifth line.\r\nLine 6: This is the sixth line.\r\nLine 7: This is the seventh line.\r\nLine 8: This is the eighth line.\r\nLine 9: This is the ninth line.\r\nLine 10: This is the tenth line.<\/pre>\n<p>If you want to display the last 3 lines of this file, you would use the following command:<\/p>\n<pre>tail -n 3 example.txt<\/pre>\n<p>This will show you the last 3 lines of the <code>example.txt<\/code> file.<\/p>\n<pre>Line 8: This is the eighth line.\r\nLine 9: This is the ninth line.\r\nLine 10: This is the tenth line.<\/pre>\n<hr>\n<h3>2. Display lines starting from a specific line number<\/h3>\n<pre>tail +[number] [file]<\/pre>\n<p>The command with the <code>+<\/code> sign outputs data starting from the specified line number.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Let\u2019s say you have a text file named <code>example.txt<\/code> with the following content:<\/p>\n<pre>Line 1: This is the first line.\r\nLine 2: This is the second line.\r\nLine 3: This is the third line.\r\nLine 4: This is the fourth line.\r\nLine 5: This is the fifth line.\r\nLine 6: This is the sixth line.\r\nLine 7: This is the seventh line.\r\nLine 8: This is the eighth line.\r\nLine 9: This is the ninth line.\r\nLine 10: This is the tenth line.<\/pre>\n<p>If you want to display the content starting from line 5 to the end of the file, you can use the following command:<\/p>\n<pre>tail +5 example.txt<\/pre>\n<p>The output will be:<\/p>\n<pre>Line 5: This is the fifth line.\r\nLine 6: This is the sixth line.\r\nLine 7: This is the seventh line.\r\nLine 8: This is the eighth line.\r\nLine 9: This is the ninth line.\r\nLine 10: This is the tenth line.<\/pre>\n<hr>\n<h3>3. Display multiple files<\/h3>\n<pre>tail [file1] [file2]<\/pre>\n<p>Use this command to display the data of multiple files at the same time.<\/p>\n<p><strong>Example 1: Viewing the Last 10 Lines of a Single File<\/strong><\/p>\n<p>Let\u2019s say you have a file named <code>example.txt<\/code> with the following content:<\/p>\n<pre>Line 1: Hello\r\nLine 2: World\r\nLine 3: This\r\nLine 4: is\r\nLine 5: a\r\nLine 6: sample\r\nLine 7: text\r\nLine 8: file\r\nLine 9: for\r\nLine 10: demonstration\r\nLine 11: purposes\r\nLine 12: only<\/pre>\n<p>Running the command:<\/p>\n<pre>tail example.txt<\/pre>\n<p>Will output:<\/p>\n<pre>Line 3: This\r\nLine 4: is\r\nLine 5: a\r\nLine 6: sample\r\nLine 7: text\r\nLine 8: file\r\nLine 9: for\r\nLine 10: demonstration\r\nLine 11: purposes\r\nLine 12: only<\/pre>\n<p><strong>Example 2: Viewing the Last 10 Lines of Multiple Files<\/strong><\/p>\n<p>Suppose you have another file named <code>example2.txt<\/code> with the following content:<\/p>\n<pre>Line 1: Another\r\nLine 2: Example\r\nLine 3: File<\/pre>\n<p>You can view the last 10 lines of both <code>example.txt<\/code> and <code>example2.txt<\/code> by running:<\/p>\n<pre>tail example.txt example2.txt<\/pre>\n<p>This will output:<\/p>\n<pre>==> example.txt <==\r\nLine 3: This\r\nLine 4: is\r\nLine 5: a\r\nLine 6: sample\r\nLine 7: text\r\nLine 8: file\r\nLine 9: for\r\nLine 10: demonstration\r\nLine 11: purposes\r\nLine 12: only\r\n\r\n==> example2.txt <==\r\nLine 1: Another\r\nLine 2: Example\r\nLine 3: File<\/pre>\n<p>The <code>==><\/code> <code><==<\/code> notation is used to separate the output from different files.<\/p>\n<hr>\n<h3>4. Output a certain number of bytes<\/h3>\n<pre>tail -c [bytes] [file]<\/pre>\n<p>To display a specific number of bytes in a text file, use the <code>-c<\/code> option.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Let's say we have a file named <code>sample.txt<\/code> with the following content:<\/p>\n<pre>This is the first line.\r\nThis is the second line.\r\nThis is the third line.\r\nThis is the fourth line.\r\nThis is the fifth line.<\/pre>\n<p>If we want to display the last 20 bytes of this file, we would use the following command:<\/p>\n<pre>tail -c 20 sample.txt<\/pre>\n<hr>\n<h3>5. Use multiple commands at once<\/h3>\n<pre>tail [file] | [other_command]<\/pre>\n<p>Use the <code>tail<\/code> command with pipes <code>|<\/code> to use it in conjunction with another command.<\/p>\n<p><strong>Example: Using <code>tail<\/code> with <code>grep<\/code><\/strong><\/p>\n<p>Let's say you have a log file called <code>server.log<\/code> and you want to check the last 10 lines for any occurrences of the word \"<code>error<\/code>\".<\/p>\n<pre>tail server.log | grep 'error'<\/pre>\n<p>Here's what happens:<\/p>\n<ul>\n<li><code>tail server.log<\/code> reads the last 10 lines of the server.log file.<\/li>\n<li>The output is then piped (<code>|<\/code>) to the <code>grep 'error'<\/code> command.<\/li>\n<li><code>grep 'error' <\/code>filters the lines to only show those that contain the word \"<code>error<\/code>\".<\/li>\n<\/ul>\n<hr>\n<h3>6. Monitor files in real-time<\/h3>\n<pre>tail -f [file]<\/pre>\n<p>The <code>-f<\/code> option is used to track file changes. When new log entries are added to the log file, it updates the display in the terminal window.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Let's say you have a log file named <code>application.log<\/code> that is being written to while an application is running. You want to monitor this log file for any new entries.<\/p>\n<p>Open a Terminal Window, navigate to the directory where <code>application.log<\/code> is located,<code> i.e cd \/path\/to\/directory<\/code>.<\/p>\n<p>Run the <code>tail -f<\/code> command:<\/p>\n<pre>tail -f application.log<\/pre>\n<p>After running this command, you'll see the last 10 lines of <code>application.log<\/code> displayed in the terminal. The terminal will stay open, and any new lines added to <code>application.log<\/code> will be displayed in real-time.<\/p>\n<hr>\n<h3 style=\"padding-bottom:10px\">More Linux commands:<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"150\">Directory Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rm-rmdir\/\"><code>rmdir<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cd\/\"><code>cd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-pwd\/\"><code>pwd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-exa\/\"><code>exa<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\"><code>ls<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cat\/\"><code>cat<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/\"><code>cp<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-dd\/\"><code>dd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-less\/\"><code>less<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-touch\/\"><code>touch<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ln\/\"><code>ln<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rename\/\"><code>rename<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-more\/\"><code>more<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-head\/\"><code>head<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File System Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-chown\/\"><code>chown<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mkfs\/\"><code>mkfs<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-locate\/\"><code>locate<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Networking<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\"><code>ping<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-curl\/\"><code>curl<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-wget\/\"><code>wget<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-iptables\/\"><code>iptables<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mtr\/\"><code>mtr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Search and Text Processing<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-find\/\"><code>find<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-grep\/\"><code>grep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sed\/\"><code>sed<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-whatis\/\"><code>whatis<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ripgrep\/\"><code>ripgrep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-fd\/\"><code>fd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tldr\/\"><code>tldr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">System Information and Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-env\/\"><code>env<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\"><code>history<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-top\/\"><code>top<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-who\/\"><code>who<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-htop\/\"><code>htop<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-glances\/\"><code>glances<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-lsof\/\"><code>lsof<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">User and Session Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\"><code>screen<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-su\/\"><code>su<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sudo\/\"><code>sudo<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-open\/\"><code>open<\/code><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>The tail command stands for \u201ctail of the file,\u201d and as the name suggests, it\u2019s primarily used to view the last part of files. Whether you\u2019re monitoring log files or tracking real-time data changes, tail is your go-to utility. The command is often used in conjunction with other Linux commands like grep for searching, awk&hellip;<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[888,3316],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use the Tail Command in Linux - Hongkiat<\/title>\n<meta name=\"description\" content=\"The tail command stands for &quot;tail of the file,&quot; and as the name suggests, it&#039;s primarily used to view the last part of files. Whether you&#039;re monitoring\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use the Tail Command in Linux\" \/>\n<meta property=\"og:description\" content=\"The tail command stands for &quot;tail of the file,&quot; and as the name suggests, it&#039;s primarily used to view the last part of files. Whether you&#039;re monitoring\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-28T07:01:44+00:00\" \/>\n<meta name=\"author\" content=\"Hongkiat.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hongkiat.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/\"},\"author\":{\"name\":\"Hongkiat.com\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\"},\"headline\":\"How to Use the Tail Command in Linux\",\"datePublished\":\"2023-11-28T07:01:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/\"},\"wordCount\":539,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"Linux\",\"Linux Commands\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/\",\"name\":\"How to Use the Tail Command in Linux - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-11-28T07:01:44+00:00\",\"description\":\"The tail command stands for \\\"tail of the file,\\\" and as the name suggests, it's primarily used to view the last part of files. Whether you're monitoring\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-tail\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use the Tail Command in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\",\"name\":\"Hongkiat.com\",\"description\":\"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use the Tail Command in Linux - Hongkiat","description":"The tail command stands for \"tail of the file,\" and as the name suggests, it's primarily used to view the last part of files. Whether you're monitoring","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/","og_locale":"en_US","og_type":"article","og_title":"How to Use the Tail Command in Linux","og_description":"The tail command stands for \"tail of the file,\" and as the name suggests, it's primarily used to view the last part of files. Whether you're monitoring","og_url":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2023-11-28T07:01:44+00:00","author":"Hongkiat.com","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat.com","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/"},"author":{"name":"Hongkiat.com","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3"},"headline":"How to Use the Tail Command in Linux","datePublished":"2023-11-28T07:01:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/"},"wordCount":539,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["Linux","Linux Commands"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/","url":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/","name":"How to Use the Tail Command in Linux - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2023-11-28T07:01:44+00:00","description":"The tail command stands for \"tail of the file,\" and as the name suggests, it's primarily used to view the last part of files. Whether you're monitoring","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-tail\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use the Tail Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3","name":"Hongkiat.com","description":"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/com\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-fns","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=59114"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59114\/revisions"}],"predecessor-version":[{"id":68920,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59114\/revisions\/68920"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=59114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=59114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=59114"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=59114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}