cleanup large files

42 views
Skip to first unread message

Srikrishna Murthy Annam

unread,
Jun 17, 2014, 9:30:23 AM6/17/14
to askm...@googlegroups.com
$ du -sh mod_wl_ohs.log
11G     mod_wl_ohs.log

=================

awk 'END{print NR}' mod_wl_ohs.log   ==> To find the number of lines in file
sed -i '1,157230000d' mod_wl_ohs.log     ==> option -i is very important to delete the lines,otherwise source file will contain the data and only result will be output to console.


Reply all
Reply to author
Forward
0 new messages