2
votes
2answers
550 views

Tail -f piped through grep not outputing to file, but outputs to console

I'm using the following command tail -f /mydir/myfile | grep "searchterm" >> outfile Without the -f it works fine, but with the -f, which I need, nothing is written to the file. The ...
3
votes
1answer
333 views

limit stdout to terminal output speed [duplicate]

Possible Duplicate: How can I limit the output speed of stdout? What's the easiest way to limit the speed at which stdout is output in a terminal, so that, for instance, tail -f outputs ...
4
votes
4answers
2k views

Output file contents while they change

I want to output a file's contents while they change, for example if I have the file foobar and I do: magic_command foobar The current terminal should display the file's contents and wait until, I ...
1
vote
1answer
62 views

Can I use tail with a file both as input and destination?

I have a log file that gets big fast. I tried using tail with this syntax but it didn't work. tail logfile.log -n 100000 > logfile.log The output file is 0 bytes and blank. What am I doing ...
2
votes
4answers
2k views

How to limit the number of lines a command's output has available in bash?

I started downloading a big file in the background using $ nohup wget http://example.tld/big.iso & which also gives me a nohup.out file that includes the output of wget. Now, if I later want ...