Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    71

    Unanswered: Truncating alert.log file

    Hi,

    Its a unix question.
    I want to truncate the alert.log file. But I want to keep last 1000 lines of it .
    What is the command to do it.

    Thanks
    Rema

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    tail the file into itself

    tail -1000 alert.log > alert.log

    that should work I believe.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •