02-09-2016
This looks like HPUX.
Specifically look at Methyl's answer about reading the man page.
/var/adm/wtmps questions
There are C structs that show layout of data in the wtmpxx files I believe.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
2. UNIX for Advanced & Expert Users
Hi Gurus,
I am having an requirement. i have to read a list file which contains file names and send mail to different users based on the files in the list file.
eg. if file a.txt exists then send a mail to a@a.com
simillary for b.txt,c.txt etc.
Thanks for your help,
Nimu (6 Replies)
Discussion started by: nimu1979
6 Replies
3. UNIX for Dummies Questions & Answers
I have 2 boxes running HP-UX B.11.23 U ia64, one production, one development.
I just found out that "last" is not working on the production machine. After some investigation, I find that the /var/adm/wtmps file has been allowed to grow and then has not been touched since Dec 2007. /var/adm/wtmp... (2 Replies)
Discussion started by: LisaS
2 Replies
4. Shell Programming and Scripting
Need to develop a unix shell script for the below requirement and I need your assistance:
1) search for file.log and file.bad file in a directory and read them
2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file
4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies
5. Shell Programming and Scripting
Hi,
I am running this command through a shell script and getting the error mentioned in the subject line:
testing.awk -f x.txt TNAME
My testing.awk file contains something like
++++++++++++++++++
#!/usr/bin/awk -f
BEGIN{
TAB_NAME="INSERT_ONE_" ARGV ;
}
if ( $1=="JAM_ONE" &&... (1 Reply)
Discussion started by: kunwar
1 Replies
6. Shell Programming and Scripting
Hi All
I have written the following script:
#!/bin/ksh
while read cmdline
do
echo `$cmdline`
pid="$cmdline"
done<commands.txt
===========
commands.txt contains:
ps -ef | grep abc | grep xyz |awk '{print $2};
My objective is to store the o/p of the command in a variable and do... (8 Replies)
Discussion started by: rahulparo
8 Replies
7. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies
8. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
Discussion started by: sravanreddy
4 Replies
9. Shell Programming and Scripting
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies
last(1) General Commands Manual last(1)
NAME
last, lastb - indicate last logins of users and ttys
SYNOPSIS
file] [name ...] [tty ...]
file] [name ...] [tty ...]
DESCRIPTION
The command searches backwards through the file (which contains a record of all logins and logouts) for information about a user, a tty, or
any group of users and ttys. Arguments specify names of users or ttys of interest. The names of ttys can be given fully or abbreviated.
For example, is the same as If multiple arguments are given, the information that applies to any of the arguments is printed. For example,
lists all of sessions as well as all sessions on the console terminal. The command prints the sessions of the specified users and ttys,
most recent first, indicating when the session began, the duration of the session, and the tty on which the session took place. indicates
if the session is still in progress or if it was cut short by a reboot.
The pseudo-user logs each time the system reboots. Thus, is a useful command for evaluating the relative time between system reboots.
If is interrupted, it indicates how far the search has progressed in If interrupted by a quit signal (generated by a Ctrl-), indicates how
far the search has progressed, then continues the search.
The command searches backwards through the database file to display bad login information. Access to should be restricted to users with
appropriate privileges (owned by and readable only by because it may contain password information.
Options
The and commands recognize the following options and arguments:
(none) If no arguments are specified, prints a record of all logins and logouts in reverse order, most recent first.
When used with
and displays the user's host name as it is stored in the files and respectively. The host name is displayed between the
tty name and the user's login time.
Limits the report to
number of lines.
Use file as the name of the accounting file instead of or
Use file as the name of the accounting database instead of This option should be used along with the option.
Display the fields in long format if this flag is used
along with the flag. Without the flag, normal output is displayed.
AUTHOR
was developed by the University of California, Berkeley and HP.
FILES
Bad login database
Login database
New login database
New bad login database
SEE ALSO
login(1), utmp(4), wtmps(4).
last(1)