Skip to main content
The 2024 Developer Survey results are live! See the results

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.

0 votes
1 answer
19 views

Linux shell - Output ping to file and only keep last X lines

I want to write a shell-Script for my Raspberry Pi to permanently ping a specific host but only keep the last 20 results in a text file. So my idea was to redirect the ping output to a text file and ...
GuidoT's user avatar
  • 282
0 votes
1 answer
74 views

Powershell following rotation of log file

I know that is not a good idea runs a script for ever but, I need to continuously tail a log file, for some days, to get the evidence of some errors. Problem is that this log file rotates multiple ...
ilRobby's user avatar
  • 81
2 votes
3 answers
88 views

Deleting selected element in a doubly linked list [duplicate]

I have written a code on deleting a node by comparing its data from the data given. If equal, it deletes the node. My problem is that my code will delete every node in the list except the last node, I ...
Sanjai S's user avatar
0 votes
1 answer
37 views

What is the purpose of tail -f /dev/null, usually at the end of scripts?

Before you light your torches: I know what /dev/null is I know how I/O redirection works in shell commands I know what tail and -f flag does However, I cannot grasp the reason for using the ...
cristian's user avatar
  • 979
0 votes
1 answer
72 views

how can i tail the last line of multiple log files, only if they have not completed yet?

I have multiple subdirectories, and each has a log file that I want to check, but I only want to check the log files that have not reached the "completed" state. The last line of a completed ...
pocho's user avatar
  • 1
1 vote
1 answer
49 views

Quit tail -f command from script

I am doing tail -f -n 10 test.log . I want this tail command to terminate once a signal file is created at some location . say finish.txt. If finish.txt file exists then stop tailing or else continue
sushil sinha's user avatar
0 votes
1 answer
53 views

How to interact with an application on a remote computer via tail?

There is a need to send commands to a remote application via tail. Locally I'm currently using tail, I want to control it remotely, but I can't get it to work. I tried paramiko libraries, I couldn’t ...
Andy_bat's user avatar
0 votes
0 answers
37 views

Input field is not showing character tails

I am having a problem creating my web page. I am using a downloaded font, which looks correct everywhere except in the input field. The tails of the characters g, q, y, p, j do not show correctly in ...
Polo Markov's user avatar
1 vote
1 answer
91 views

Tail log file with Powershell and email but only on first occurrence until next time

I've found the following script to send an email when a string is found in a log file Get-Content C:\temp\server.log -Wait -Last 0 | Where-Object { $_ -match "ERROR \[STDERR\]" } | ForEach-...
Donald Martin's user avatar
0 votes
0 answers
90 views

Suddenly docker tail command stops giving live docker container logs in some of the services

Hope everyone doing well! I have production environment which runs multiple docker containers on the ubuntu server. Since last 5 to 6 days I am facing issue in some of the services where suddenly ...
Vk Suhagiya's user avatar
0 votes
1 answer
52 views

Monitoring a file that gets created by a sub-program executed in my in c++ program

I'm executing a script from my c++ code. During its execution this script (say my_script) writes some information to a file (say a.txt) and I want to print that information in my main program's ...
Some random programmer's user avatar
0 votes
1 answer
481 views

Tail and grep docker logs

How can I both tail and grep Docker logs? I've tried the following: sudo docker logs -f my_container | grep foo This should tail all lines with foo from the container's logs, but instead shows ...
user2233706's user avatar
  • 6,910
3 votes
3 answers
79 views

Haskell basic - pattern matching vs list tail

I'm doing Set7.hs from haskell.mooc.fi/ Exercises7 -- Ex 5: reverse a NonEmpty list. -- -- PS. The Data.List.NonEmpty type has been imported for you -- below doesn't work -- reverseNonEmpty :: ...
bastiat's user avatar
  • 2,011
1 vote
2 answers
74 views

How to return the last two lines of summary output from a linear model in R?

After finding a regression prediction in lm I want to return only last two lines of the summary. What would be the best function to use? my_model_lm(y ~ x1 + x2 + x3, data = [data]) summary_result <...
Gwyrion's user avatar
  • 13
0 votes
1 answer
58 views

Questions about tail -c [closed]

When I open my terminal and input the command echo 987654321 | tail -c3, the output is 21. However, when I create a file named test_tail.sh, write 987654321 into the file, the command tail -c3 ...
Yongwu Xiu's user avatar

15 30 50 per page
1
2 3 4 5
70