public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: Khai Doan <khai@genius.com>, linux-kernel@vger.kernel.org
Subject: Re: How to create a fixed length character/block device/file ?
Date: Fri, 26 Jan 2007 22:04:57 +0100	[thread overview]
Message-ID: <45BA6CF9.1030505@gmail.com> (raw)
In-Reply-To: <45BA6999.4000807@cfl.rr.com>

Phillip Susi napsal(a):
> Khai Doan wrote:
>> Sorry if this is the wrong list.  I've search google, but have not 
>> found solution to my problem.
>>
>> I have a long running application which split out lots of debugging 
>> information.  I can't redirect the output to a regular file because 
>> that file would grow and eat up all the diskspace.  I can't redirect 
>> to /dev/null.  What I want is the last 1MB of the output before my 
>> application terminated.  So I need to create a special file / device 
>> on the system.  Please tell me if  there is an existing device that I 
>> can use, or point me in the right direction so that I can role my own 
>> device.
> 
> myapp | tail -c1048576 > logfile

AFAIK this will output the file after the app termination. He wants to know the 
log before that.

Just write your own reader which will output last meg in some intervals...

regards,
-- 
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E

  reply	other threads:[~2007-01-26 21:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-26 20:10 How to create a fixed length character/block device/file ? Khai Doan
2007-01-26 20:49 ` H. Peter Anvin
2007-01-26 20:50 ` H. Peter Anvin
2007-01-26 20:50 ` Phillip Susi
2007-01-26 21:04   ` Jiri Slaby [this message]
2007-01-26 21:35 ` Alan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45BA6CF9.1030505@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=khai@genius.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=psusi@cfl.rr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox