tail Questions

13

Solved

Is that possible to use grep on a continuous stream? What I mean is sort of a tail -f <file> command, but with grep on the output in order to keep only the lines that interest me. I've trie...
Chicanery asked 23/8, 2011 at 13:34

4

Solved

Problem Description This is my file 1 2 3 4 5 6 7 8 9 10 I would like to send the cat output of this file through a pipe and receive this % cat file | some_command 1 2 ... 9 10 Attempted solutio...
Leanora asked 7/12, 2021 at 21:3

6

Solved

I need to retrieve the last n lines of huge files (1-4 Gb), in Windows 7. Due to corporate restrictions, I cannot run any command that is not built-in. The problem is that all solutions I found app...
Graphology asked 8/4, 2016 at 19:2

9

Solved

I would guess most people on this site are familiar with tail, if not - it provides a "follow" mode that as text is appended to the file tail will dump those characters out to the terminal. What I...
Indicia asked 24/10, 2008 at 1:35

11

Solved

how to get the value of the last element of a List? I've noted that List.hd (or .Head) return an item, while List.tl (or .Tail) returns a List. Is rev the List and get the hd the only way around? ...
Selfdenial asked 23/7, 2009 at 23:31

3

Solved

What have I tried so far... Command: find . -type f -ctime -3 | tail -n 5 Result: ./Mobilni Telefoni/01. Box Update/05. DC Unlocker Client/dc-unlocker_client-1.00.0857.exe ./Mobilni Telefoni/0...
Fungal asked 13/5, 2012 at 22:12

3

Solved

How can i use powershell to tail a specific windows event log? Is it possible?
Tammeratammi asked 7/3, 2013 at 2:52

3

How is it possible to tail a file located at several remote servers in a known location using ansible? This question is based on this comment on this Hacker News thread: In my company, we have h...
Agatha asked 12/11, 2015 at 2:21

6

Solved

If I have a file name myownfile.txt which contains 3 lines of text. foo hello world bar I want to display the line in the middle which is hello world by using head and tail command only.
Aftergrowth asked 1/11, 2011 at 19:28

3

Solved

Problem: I have a CSV dump file - with excess of 250,000 lines. When I use while read - it takes a while (no pun intended). I would like to go back to the last 10,000 lines to do what I need to do ...
Scarface asked 5/11, 2015 at 2:16

2

Solved

I was trying using head command, in macOS using zsh, code below, a.txt: 1 2 3 4 5 6 7 8 9 10 tail -n +5 a.txt // line 5 to line end tail -n -5 a.txt // last line 5 to line end head -n +5 a.txt...
Nat asked 21/2, 2020 at 9:33

3

Solved

I use the head(d) and tail(d) methods in R package utils a lot - frequently one after the other. So I wrote a simple wrapper for the two functions: ht <- function(d, m=5, n=m){ # print the h...
Cedell asked 22/7, 2012 at 12:43

11

Solved

I have a file that is constantly being written to/updated. I want to find the last line containing a particular word, then print the last column of that line. The file looks something like this. M...
Pervious asked 24/10, 2012 at 9:13

1

Solved

This is a follow-up to my previous question. I am finally able to reproduce the error here: my @recentList = prompt("Get recentList: e.g. 1 2 3: ").words || (2,4,6); say "the list is: ", @recent...
Ferroconcrete asked 21/7, 2019 at 18:50

6

Solved

I don't know if there's any. But does the PHP built in a web server also save its error logs in a file? For tailing purposes, like when creating virtual host in Apache. I'm using Mac OS X.
Michalmichalak asked 25/11, 2014 at 8:53

6

I want to create a small code in C++ with the same functionality as "tail-f": watch for new lines in a text file and show them in the standard output. The idea is to have a thread that monitors th...
Caddy asked 23/4, 2010 at 7:48

1

I have a log file encoding with gbk, I have to read the data like this: tail -n 2000 nohup.out | iconv -f gbk -t utf-8 but when I use tail -f it will print nothing: tail -f nohup.out | iconv -f...
Inaccurate asked 8/5, 2018 at 10:14

1

Solved

I'm looking for a 1 liner to tail a file and grep a "string", print the first match (new line) and exit. I came up with: tail -f /var/log/logfile.log -n 0 | grep -m 1 -i string_to_match actual ...
Pamphleteer asked 1/1, 2019 at 8:47

4

I know how to tail a text file with a specific number of lines, tail -n50 /this/is/my.log However, how do I make that line count a variable? Let's say I have a large log file which is appended ...
Adah asked 14/12, 2018 at 9:42

2

Solved

Situation: I want to tail remote logs over ssh with paramiko. channel.exec_command('tail -f log.log') works fine channel.exec_command('tail -f log.log | grep "filter" ') hangs Cannot understand...
George asked 13/2, 2013 at 21:25

18

Solved

I have the following. A Java process writing logs to the stdout A shell script starting the Java process Another shell script which executes the previous one and redirects the log I check the l...
Puglia asked 11/1, 2010 at 11:21

5

Solved

Is there a pythonic way to unpack a list in the first element and the "tail" in a single command? For example: >> head, tail = **some_magic applied to** [1, 1, 2, 3, 5, 8, 13, 21, 34, 55] &...
Brandiebrandise asked 10/5, 2012 at 10:52

3

Solved

I've looked this up a thousand times, and I always forget it, so, here for eternity: Solaris has a bit of an awkward syntax for tail. How do I do the equivalent of BSD's tail -nN? What I want ar...
Pearsall asked 24/11, 2008 at 14:42

2

Solved

I'm trying to check for errors in a log file of a running embedded system. I already have implemented paramiko in my scripts, as I've been told this is the best way to use ssh in python. Now when...
Hartle asked 24/10, 2013 at 8:43

2

I try to show tail of a text file. If file is small, there is no difference. However if file is too big (~5 gB), tailf does not respond. On the other hand tail -f works fine. What is difference bet...
Lansing asked 31/3, 2015 at 7:51

© 2022 - 2024 — McMap. All rights reserved.