With gawk time and string functions:
input file:
This will print lines with date > 2009-03-06. Just add a condition for the lower boundary and you are done.
The gensub() string function replaces the - and : characters by space as the mktime() function only accepts the YYYY MM DD HH MM SS format.
Check if your awk version supports these functions.
assume files are in a directory
/data
$ ls -ltr
Just displaying Data and file name:
01/01/2004 file_3434_typea.dat
01/01/2004 file_3423_typea.dat
01/01/2004 file_3436_typea.dat
01/01/2004 file_3434_typeb.dat
01/01/2004 file_3423_typeb.dat
01/01/2004 file_3436_typeb.dat ... (3 Replies)
I need to get the list of all the log files for a particular duration, say between two dates,i.e I need to get the list of all the log files between date1 and date2.The two dates are entered by the user.
The format of the log file is :
/path_name/graph_name_20080801180308.log.
I dont... (1 Reply)
Hi all,
We have an existing script:
find /u03/oraprod/perpcomn/admin/out -type f -ctime +7 \
-exec cp {} "/u08/oraprod/backup/cout" \;
Which is to find all files more than 7 days and copy to another folder. However I would like to only list files with Sep 29, and cp to another folder.
... (2 Replies)
I would like to parse through some logs looking for things like exception or failed (grep -i failed). Ideal would be if it were in a menu format so someone without unix ability could just choose option 1 2 or 3 etc. If I could pass the hostname to a variable also that would be awesome, so someone... (5 Replies)
Right now I am parsing Tuxedo logs to calculate response times for various services. I was hoping to find a log tool that had support for Tuxedo and would generate drill down html reports.
---------- Post updated at 02:35 PM ---------- Previous update was at 02:33 PM ----------
I just wanted... (0 Replies)
Hi,
Yesterday I installed and configured logrotate on my Debian machine. I was expecting this to run at 06:25 in the morning and it actually did. All my old logs were compressed and zipped but the new logs were all with size equal to 0 bytes. Processes, while still running ok, they were not... (2 Replies)
Hi ,
I have a Data cleansing process which creates different log file for each step , when the process runs it creates following log files in below order:
p1_tranfrmr_log.txt
p1_tranfrmr_stats.txt
p2_globrtr_log.txt
p2_globrtr_stats.txt
p3_cusparse_log.txt
p3_cusparse_stats.txt
'
'... (8 Replies)
HI,
I want to search for a logs which are trace between specific date and time from logs file.
My logs are generated like this :-
Tue Jun 18 05:00:02 EEST 2013 | file_check.sh| Message:script has files to process.
Thu Jun 20 05:00:02 EEST 2013 | file_check.sh| Message:script has files to... (5 Replies)
Hi,
These are the list of files in one directory in the server :
# ls -lrt
total 10120
-rw-r--r-- 1 root root 4484 Jul 8 2011 install.log.syslog
-rw-r--r-- 1 root root 51890 Jul 8 2011 install.log
-rw------- 1 root root 3140 Jul 8 2011 anaconda-ks.cfg
drwxr-xr-x 2 root root... (2 Replies)
Discussion started by: anaigini45
2 Replies
LEARN ABOUT DEBIAN
poe::component::irc::plugin::logger
POE::Component::IRC::Plugin::Logger(3pm) User Contributed Perl Documentation POE::Component::IRC::Plugin::Logger(3pm)NAME
POE::Component::IRC::Plugin::Logger - A PoCo-IRC plugin which logs public, private, and DCC chat messages to disk
SYNOPSIS
use POE::Component::IRC::Plugin::Logger;
$irc->plugin_add('Logger', POE::Component::IRC::Plugin::Logger->new(
Path => '/home/me/irclogs',
DCC => 0,
Private => 0,
Public => 1,
));
DESCRIPTION
POE::Component::IRC::Plugin::Logger is a POE::Component::IRC plugin. It logs messages and CTCP ACTIONs to either #some_channel.log or
some_nickname.log in the supplied path. In the case of DCC chats, a '=' is prepended to the nickname (like in irssi).
The plugin tries to detect UTF-8 encoding of every message or else falls back to CP1252, like irssi (and, supposedly, mIRC) does by
default. Resulting log files will be UTF-8 encoded. The default log format is similar to xchat's, except that it's sane and parsable.
This plugin requires the IRC component to be POE::Component::IRC::State or a subclass thereof. It also requires a
POE::Component::IRC::Plugin::BotTraffic to be in the plugin pipeline. It will be added automatically if it is not present.
METHODS
"new"
Arguments:
'Path', the place where you want the logs saved.
'Private', whether or not to log private messages. Defaults to 1.
'Public', whether or not to log public messages. Defaults to 1.
'DCC', whether or not to log DCC chats. Defaults to 1.
'Notices', whether or not to log NOTICEs. Defaults to 0.
'Sort_by_date', whether or not to split log files by date, i.e. #channel/YYYY-MM-DD.log instead of #channel.log. If enabled, the date will
be omitted from the timestamp. Defaults to 0.
'Strip_color', whether or not to strip all color codes from messages. Defaults to 0.
'Strip_formatting', whether or not to strip all formatting codes from messages. Defaults to 0.
'Restricted', set this to 1 if you want all directories/files to be created without read permissions for other users (i.e. 700 for dirs and
600 for files). Defaults to 1.
'Format', a hash reference representing the log format, if you want to define your own. See the source for details.
'Log_sub', a subroutine reference which can be used to override the file logging. Use this if you want to store logs in a database instead,
for example. It will be called with 3 arguments: the context (a channel name or nickname), a type (e.g. 'privmsg' or '+b', and any
arguments to that type. You can make use "default_format" to create logs that match the default log format. Note: You must take care of
handling date/time and stripping colors/formatting codes yourself.
Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method.
"default_format"
Returns a hash reference of type/subroutine pairs, for formatting logs according to the default log format.
AUTHOR
Hinrik Oern Sigur`sson, hinrik.sig@gmail.com
perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::Logger(3pm)