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 - 2025 Tom Kacperski (microdevsys.com). All rights reserved.

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

 

The IT Development and Technology Mini Vault | MicroDevSys.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.