Header Shadow Image


Archive for February, 2014

Keep last number of lines in a file

Here is a quick way to keep the last 5000 lines of a large file instead of entirely clearing it.  A little bit of AWK though a simple array and bob's your uncle: root [XYZ01] /var/spool/mail: ls -altri test.txt daemon  1067 -rw-rw—-    1 daemon   mail       51130586 Jan 31 07:30 daemon  1061 -rw-rw—-    1 daemon   mail         […]


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License