Re: How to truncate log files.
From: Pureheart (phtp_at_pureheart)
Date: 02/02/04
- Next message: The Ghost In The Machine: "Re: Linux, the final decision"
- Previous message: Pureheart: "Re: How to truncate log files."
- In reply to: Anonymous: "Re: How to truncate log files."
- Next in thread: Anonymous: "Re: How to truncate log files."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 1 Feb 2004 16:59:23 -0800
In article <ed2dcd11f2c891736bf21b49804203ef@ecn.org>,
Anonymous <cripto@ecn.org> wrote:
>"P" == Pureheart <phtp@pureheart>:
>P> I typed:
>P>
>P> tail -1000 wtmp > wtmp
>P>
>P> and ended up w/ a zero length file.
>
>If you only want the last 1000 bytes of wtmp (wtmp is not a text file
>and keeping the last 1000 "lines" makes no sense), then try:
>
> tail --bytes=1000 wtmp > wtmp
>
Oops. Sorry. I was just using wtmp as an example since it was short and easy
to type. I had not realized its binary nature.
The bash man page clued me in asto why I got 0 bytes and anacron seems to be
my other saviour.
Thanks to all who helped me out.
pH
- Next message: The Ghost In The Machine: "Re: Linux, the final decision"
- Previous message: Pureheart: "Re: How to truncate log files."
- In reply to: Anonymous: "Re: How to truncate log files."
- Next in thread: Anonymous: "Re: How to truncate log files."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]