Aug 11, 2004 #1 Autosys Programmer Jun 1, 2004 90 GB Hi, Was wondering if someone knows how to truncate all the contents of a file except for say the last 20 lines in the file. The amount of lines in the file will never be the same. Thanks very much! S
Hi, Was wondering if someone knows how to truncate all the contents of a file except for say the last 20 lines in the file. The amount of lines in the file will never be the same. Thanks very much! S
Aug 11, 2004 2 #2 Gloups IS-IT--Management Sep 16, 2003 394 FR you can do it like that: tail -20 original_file >temp_file mv temp_file original_file Upvote 0 Downvote