I am trying to insert a line with a date stamp in a file that is used to monitor activity in one of our directories. By doing this, I want to grep that file each day and go to the last entry for each time a error occurred and pull all errors generated if any exist. If error exists I want that error... (3 Replies)
Hi,
I wrote a small perl script in unix that searches in a file and saves some information in a separate file. Since this is a log file, I would like to have the date added to file name. I have no idea where to start.
output:
log_010907.txt
thanks
ken (8 Replies)
Morning all
Im hoping you can help me. We have a nice new oracle server :( and are needing to move some files around for EDI and BACS. The server runs windows but has an app called MKS toolkit installed which give unix commands. (Needed for the oracle stuff) I have had a go using dos commands... (2 Replies)
Looking for a shell script or a simple perl script . I am new to scripting and not very good at it .
I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report.
... (0 Replies)
Hi All,
Need a small help. I have a log file which keeps updating for every Minute with multiple number of lines. I just want to grep few properties which has latest Date and Time to it. How do i do it?
I wanted to grep a property by name "Reloading cache with a maximum of" from the... (4 Replies)
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
Hi All,
i have some log files generated in a folder daily with the format
abc.def.20130306.100001
ghi.jkl.20130306.100203
abc.def.20130305.100001
ghi.jkl.20130305.100203
the format is the date followed by time . all i want is to get the files that are generated for todays... (3 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)
I am developing one script which will take log file name, output file name, date, hour and minute as an argument and based on these inputs, the script will scan and capture all the error(s) that have been triggered from a given time. Example: script should capture all the error after 13:50 on Jan... (2 Replies)
Discussion started by: ROMA3
2 Replies
LEARN ABOUT NETBSD
wtmpx
UTMPX(5) BSD File Formats Manual UTMPX(5)NAME
utmpx, wtmpx, lastlogx -- user accounting database
SYNOPSIS
#include <utmpx.h>
DESCRIPTION
In contrast to utmp and wtmp, the extended databases in utmpx and wtmpx reserve more space for logging hostnames, and also information on a
process' ID, termination signal and exit status.
The <utmpx.h> header defines the structures and functions for logging user. Currently logged in users are tracked in /var/run/utmpx, a list
of all logins and logouts, as well as all shutdowns, reboots and date changes, is kept in /var/log/wtmpx, and the last login of each user is
noted in /var/log/lastlogx.
The interface to the utmpx file is described in getutxent(3).
The wtmpx file can grow rapidly on busy systems, and is normally rotated with newsyslog(8).
In the event of a date change, a shutdown, or a reboot, the following items are logged in the wtmpx file:
date The system time has been manually or automatically updated by date(1). The command name date is recorded in the field
ut_name. In the field ut_line, the character '|' indicates the time prior to the change, and the character '{' indicates
the new time.
reboot
shutdown A system reboot or shutdown has been initiated. The character '~' is placed in the field ut_line, and reboot or shutdown
in the field ut_name (see shutdown(8) and reboot(8)), using logwtmpx(3).
FILES
/var/run/utmpx The utmpx file.
/var/log/wtmpx The wtmpx file.
/var/log/lastlogx The lastlogx file.
SEE ALSO last(1), login(1), rwho(1), w(1), who(1), endutxent(3), logwtmpx(3), utmp(5), ac(8), init(8), newsyslog(8), reboot(8)BSD January 31, 2007 BSD