Questions tagged [tail]

The tail is the part of a list that comes after the head. It's also a unix command that shows the last lines of a file.

Depending on the context tail may refer to:

  • the part of a list that comes after the head i.e. the list you obtain when you remove the first element.

  • the tail unix command which displays the last lines of a file. It's counterpart which displays the first lines is head (). Example: tail -n 10 file will output last 10 lines of file.


See also:

1032 questions
-1
votes
3 answers

Tail and Head of whole dataframe in R with column and row number

Say I have a dataframe with 250 rows and 1000 columns. I want to find the 10 maximum values and the 10 minimum values, which I can easily to with tail and head function applying on the vectorised dataframe. But how do I now which columns and rows…
Ezra
  • 159
  • 1
  • 10
-1
votes
1 answer

Get catalina.out in Apache tomcat log

Currently trying to open the file gives this error: C:\Users\....\....\apache-tomcat-8.0.45\logs>catalina.out The process cannot access the file because it is being used by another process. What I have done is to have application running in the…
-1
votes
2 answers

Why does tail command displays only two records from the bottom?

Your help will be really appreciated
Bipin
  • 31
  • 5
-1
votes
2 answers

read tfrom terminal using system calls and output last 6 lines of the input

I have to read from terminal some text using only system calls(for Linux) in C and then output the last 6 lines(just like the tail command in linux). How do I do that? If the file is smaller than 6 lines, the whole files should be outputed. The…
Karina Kozarova
  • 1,145
  • 3
  • 14
  • 29
-1
votes
2 answers

bash: dealing with strange filenames tail invalid option --1

I want my script to find a file (in the current directory) with the first line equal to START. Then that file should have FILE as the last line. So I want to extract the - I use tail for this. It works ok for standard file…
micsza
  • 789
  • 1
  • 9
  • 16
-1
votes
1 answer

Printing the Key of Node by Tail Pointer

I just have a quick question about how you would print the last element in a queue. Here is what I have so far: struct queue { node * head; node * tail; }; void printQ(queue & q) { node * p = q.head; cout << "QUEUE: "; if (q.head == NULL) …
Buffalo282
  • 29
  • 1
  • 1
  • 6
-1
votes
1 answer

how can I tail a file with a dynamic grep pattern?

I have a log file containing lines about different users, and I'm tailing this file in real time. I want to filter out the lines that are only related to a user that I specify, ex: 1234. The log entries look like this: ID:101 Username=1234 ID:102…
A.H.
  • 1
  • 4
-1
votes
1 answer

Unexpected Acess violation reading (tail)

Here is my tail code (for first 10 lines): #include #include #include typedef char storage_datatype; #define MAXLINESIZE 1000 #define STORAGESIZE 10000 #define MAXLINES 100 int mgetline(char*, int); char* alloc(int…
Siliproksi
  • 183
  • 9
-1
votes
1 answer

how to use script with sed command in linux?

How can I use the sed command (in Linux) to find the 1000th line in a file with 10000 lines and replace just that one line with another? Thanks in advance!
Bhushan Ahire
  • 79
  • 1
  • 6
-1
votes
1 answer

A daemon to tail a log and fork multiple external (perl) script

I'm trying to write a program, actually a daemon, which stay in memory and perform something like tail -F on a rapidly updated log file. Then the program, when detect a new line on the file, have to launch another compiled perl script which will…
Chrome
  • 1
  • 1
-1
votes
1 answer

Using tail with if and then statements

Trying (In theory) to tail a log file, of the last two lines (-n 2), then proceed using if/then statements. This of course, would be a script that would be called from the launchctl .plist. Basically it looks like this in my head, although it's not…
James Dean
  • 155
  • 1
  • 17
-1
votes
1 answer

How to rotate child "bones" in a dog's tail in SVG?

I'm overwhelmed by approaches and tools for SVG, and would like to find a super simple way to position and draw a stick-figure dog's "tail", consisting of maybe five "bones". each of which could be a line or rectangle for now. I'd like each child…
-1
votes
1 answer

How should Implementation of Pipeline and Tail command be done in C language?

How do I write a C program that implements the following commands: tail -5 /etc/passwd | grep e | sort > result.txt What should the C program contain? How should r_read and r_write be implemented in the C program?
Abdul Moeed
  • 19
  • 1
  • 4
-1
votes
1 answer

Will the tail '-c' parameter only return the specified number of bytes of the line? Or will it return the entire line in chunks of -c bytes?

I have a log file recieveing msgs of up to 8k bytes. I would like those messages to be smaller. I am currently tailing the log file with tail -c +1 -F however this grabs the entire 8k message which is to big. I would like to do something like tail…
steve
  • 2,488
  • 5
  • 26
  • 39
-1
votes
3 answers

head and tail on Unix

My second homework assignment asks for us to write a command in Unix or Linux to extract certain sections of multiple files using head and tail. I'm not understanding how to go about this. Here is the question: (5 points) Using head and tail, write…
N00b123
  • 11
  • 1
  • 2