02-17-2012
What Operating System and version you you have and what Shell do you use?
What are you trying to achieve? What final output are you looking for?
What are the names of the various wtmp files? Are they all in the same directory (including the active wtmp file itself)?
Have you been able to preserve the timestamp on each wtmp file?
There is rarely ever a need to expand a whole wtmp file into text.
Ps. I regularly run a script to find the last time a named user logged in. This script looks at a long history of wtmp files in reverse chronological order.
Last edited by methyl; 02-17-2012 at 12:16 PM..
Reason: typo
9 More Discussions You Might Find Interesting
1. SuSE
Currently we are doing the migration to unix to linux.
I am facing the new problem
kganeshb@its04489:~/scripts $ ls -l | more
total 340
-rw-r----- 1 kganeshb users 9038 Oct 22 13:23 109_db.txt
-rw-rw---- 1 dlc users 1413 Oct 10 17:40 1.txt
-rw-rw---- 1 kganeshb users 45 Jan 28 13:46 a... (2 Replies)
Discussion started by: kingganesh04
2 Replies
2. Shell Programming and Scripting
Hello
I have log file from solaris system which has date field converted by Java application using System.currentTimeMillis() function, example is 1280943608380 which equivalent to GMT: Wed, 04 Aug 2010 17:40:08 GMT.
Now I need a function in shell script which will convert 1280943608380... (3 Replies)
Discussion started by: Yaminib
3 Replies
3. Shell Programming and Scripting
Here is two time I have:
Jul 12 16:02:01
Jul 13 01:02:01
and how can I do a simple match to get difference between two time which is 09:00:00
Thanks in advance. (3 Replies)
Discussion started by: ford99
3 Replies
4. Shell Programming and Scripting
This does not work. One line works but my pattern are about 100 characters long and it is messy to read. When I try to use several lines it does not two'
find "$inputDirectory" \( -name 'very long pattern1'
-o -name 'very long pattern2'
-o -name... (1 Reply)
Discussion started by: Michael Stora
1 Replies
5. Shell Programming and Scripting
Can someone help me to write a shell script to convert epoch timestamp into human readable format
1394553600,"test","79799776.0","19073982.728571","77547576.0","18835699.285714"
1394553600,"test1","80156064.0","19191275.014286","62475360.000000","14200554.720000"... (10 Replies)
Discussion started by: Moon1234
10 Replies
6. Shell Programming and Scripting
I am trying to create a script that will take epoch (input from command line) and convert it into a readable format in bash/shell
---------- Post updated at 08:03 PM ---------- Previous update was at 07:59 PM ----------
#!bin/bash
read -p "Please enter a number to represent epoch time:"... (9 Replies)
Discussion started by: sprocket
9 Replies
7. Shell Programming and Scripting
Hi,
Does anyone have a script to truncate the wtmp file.
I want to move older entries in the wtmp to a new file and move it out of var/adm and shrink the size. (4 Replies)
Discussion started by: ElizabethPJ
4 Replies
8. Shell Programming and Scripting
I am trying to hit an URL using below command and get the data into an excel sheet.
wget --user=<<USERID>> --pass=<<PASSWROD>> http://www.files.thatbelongstome.com/file1 -O test1.xls
Next step is to consolidate files from 1 to 10 in a single excel sheet and send to my mail. I am working on... (1 Reply)
Discussion started by: PikK45
1 Replies
9. Shell Programming and Scripting
Hello.
I am comparing two binary file.
The first file is the source file. The second file is a modified version of the first one.
Modification concern uuid value.
Example
first file have multiple occurrences of 69a3604b-ac2b-43b7-af84-0a4a67fc6962 second file have the same occurence... (1 Reply)
Discussion started by: jcdole
1 Replies
WCAT(1) User Commands WCAT(1)
NAME
wcat - printout wtmp entries
SYNOPSIS
wcat [-w wtmp|-] [-adX[3|4]] [-s start] [-e end] [-b H[:M[:S]]] [--help] [--version]
SYNOPSIS
Wcat provides an easy way to recover trimmed information from wtmp binary files. This tool can be useful for scripts that need only partial
information from them.
Notice that wcat output is binary wtmp entries so if this information is printed out to a terminal or screen it might mess it up. A better
use of wcat would be: wcat | rawtmp -w -
OPTIONS
-w wtmp|-
Read alternate wtmp file.
-X[3] Read tacacs 3.x wtmp format.
-X4 Read tacacs 4.0 wtmp format.
-d Output time in MMM DD HH:MM:SS date format.
-a Print contents of ut_addr (if it exists) instead of ut_host.
-s start
Display accounting info from `start'.
-e end Display accounting info up to `end'.
-b H:M:S
Show accounting info from the last few hours/minutes/seconds.
--help Print this help message.
--version
Print the version of rawtmp.
SEE ALSO
sac(8), ac(1), last(1), rawtmp(1), wtmp(5), netdate(8L)
FILES
/var/log/wtmp login database
/usr/adm/radacct/.../detail Radius accounting logs
AUTHOR
The upstream author of wcat is Steve Baker (ice@mama.indstate.edu)
This manpage was written by Javier Fernandez-Sanguino based on help2man for the Debian GNU/Linux distribution (but can be used by others).
wcat v1.0 (c) 2001 by Steve Baker January 2003 WCAT(1)