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
4 answers

How to return the first n-1 elements of a list of length n in Haskell?

I know about the tail function that returns the last n-1 elements of a list (where n is the length of the list), so I defined my own "cotail" function to return the first n-1 elements: cotail = (reverse . tail . reverse) Is this the best way, or is…
Turion
  • 5,684
  • 4
  • 26
  • 42
-1
votes
2 answers

How does Prolog handle this query

Considering the following definition: my_append([], L, L). my_append([H|T], L, [H|NewTail]):- my_append(T, L, NewTail). And a possible usage, and its output: ?- my_append([1,2,5], [3,4], L). L = [1, 2, 5, 3, 4]. Could someone help me understanding…
user1816481
  • 107
  • 1
  • 8
-1
votes
2 answers

php web tail -f utility

I am programming a web tail -f utility in PHP at the moment. I already finished the part which ajax-requests tail.php every x milliseconds to get the last added lines. Now I am at the point where I somehow need to keep track of what the last printed…
Zulakis
  • 7,859
  • 10
  • 42
  • 67
-1
votes
1 answer

How a process running on one machine can know whether another process is running on different machine in linux using c/c++?

I have process1 running on one machine and generating some log file. Now I want to launch a another process which can be on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file…
Saurabh
  • 51
  • 5
-2
votes
2 answers

Why does my tail command -n+NUM not work?

I want to understand the following command in Linux: # tail -n+454 /path/to/a/file | head -n 6 I expect that tail -n+454 /path/to/a/file prints the lines, starting at line 454 and the following 5 lines. The | sends that output tohead as an input.…
aurumpurum
  • 932
  • 3
  • 11
  • 27
-2
votes
1 answer

Print only lines between curly braces from tail -f

I have a script that reads several debug logs, appends it to a temp file, then does a tail -f on the debug file so that we can monitor debug events in a single window and easily see when a user action induces an event. There is a bunch of metadata…
DyslexicHobo
  • 17
  • 1
  • 1
  • 6
-2
votes
1 answer

Linux terminal tail commands

i've searched a lot for this and i couldn't find any helpful information, what's the difference between "tail –f /var/log/messages" and "tail –f /var/log/maillog" in Linux?
rodi
  • 13
  • 5
-2
votes
1 answer

Unix command for below file

I have a CSV file like below 05032020 Col1|col2|col3|col4|col5 Infosys Tcs Wipro Accenture Deloitte I want record count by skipping date and Header columns O/p: Record count 5 with including line numbers cat …
-2
votes
2 answers

How to get last 5 rows per column value on Pandas (5 actions before abandonment)

Relatively new to Py and this forum, thanks in advance for the help. I am trying to get the last 5 actions customers did before leaving a page on the website. if i have a data sample like this: index session_uuid timestamp action 0 1 …
TatoE
  • 1
  • 1
-2
votes
2 answers

Replacing row elements in a dataframe based on values from another dataframe

I'm fairly new to R so I hope somebody can help me. An output table in one of my scripts is the averagetable below showing different proportions of the event Standing in three different clusters: > print(averagetable) Group.1 Standing 1 cluster1…
juancda4
  • 323
  • 1
  • 8
-2
votes
1 answer

How to print lines between 2 values using tail & head and pipe?

For example:how can I print specific lines of a .txt file between line 5 and line 8 using only tail and head
lambozsolty
  • 81
  • 10
-2
votes
1 answer

Interval numbers in matrix

I have a data frame with 3523 observation and 92 variables. Below an example of a data frame with 6; the 24h recording of the observations starts at 4:00am and ends 4:00am . 04:00 04:15 04:30 05:00 ... 04:35 1 - - - - …
-2
votes
1 answer

Tail command without permission in Linux

When I try to use 'tail' command in a cloud server, I'm get a permission denied error: $ ssh myUser@server :~$ tail /var/log/syslog tail: cannot open ‘/var/log/syslog’ for reading: Permission denied How to get permission in tail command?
eroberto88
  • 11
  • 1
  • 2
-2
votes
1 answer

Not able to send commands to the server from Java code

I am not able to send commands to the server. However the connection is established and I am able to do the simple operations like "rm /usr/testfile". When I try to execute the command like "tail -f /opt/logs/applications/db/cbss.log >>…
-2
votes
1 answer

My list keeps having it's head and tail as a null

I'm new here and I'm currently working on some code for university. I have developed a code for my project but my list's head and tail keep coming back null even though the program itself reads the file it's suppose to get it's info from. Can you…
1 2 3
68
69