Dear friends
Is it possible to make a file of specified number of line I mean i want to careate a log file which should not exceed more then 1000 line then how can i define the limit
like say
" my_script_generating_log.sh >> log.txt "
and second
is it possible that if 1001 line need to be recorded to log.txt file then automatically first line get deleted and so on. if 1002 line come 2nd should be delete means total no of lines should be 1000 and whenever new line comes to the log.txt oldest line get deleted automatically.. or any other similar IDEA which can resolve this target. the target is that i want all latest 1000 logs only which was generated by my script basically it is urlsnarf package which record the brawsing history of users on eth0. I want only latest 1000 logs.
urlsnarf -i eth0 >> log.txt
third
please give me any idea how can i view, cat a file which was created by mkfifo command
thanks
Is it possible to make a file of specified number of line I mean i want to careate a log file which should not exceed more then 1000 line then how can i define the limit
like say
" my_script_generating_log.sh >> log.txt "
and second
is it possible that if 1001 line need to be recorded to log.txt file then automatically first line get deleted and so on. if 1002 line come 2nd should be delete means total no of lines should be 1000 and whenever new line comes to the log.txt oldest line get deleted automatically.. or any other similar IDEA which can resolve this target. the target is that i want all latest 1000 logs only which was generated by my script basically it is urlsnarf package which record the brawsing history of users on eth0. I want only latest 1000 logs.
urlsnarf -i eth0 >> log.txt
third
please give me any idea how can i view, cat a file which was created by mkfifo command
thanks
Comment