08-07-2008
Hi Dhruva,
the command what you have suggest using only one grep is taking me more time than what i was using previously... Can you suggest me some other command which reduces exec time...
9 More Discussions You Might Find Interesting
1. AIX
Hi,
I am new script programming, I have written a script shown velow to read username and passwd from /etc/security/passwd, i am able to read username, but unable to grep lastupdate. please look into the code and suggest if any changes need.
#!/bin/ksh
USERNAME=""
fname=/usr/bin/lastupdate... (1 Reply)
Discussion started by: me_haroon
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
I want to check whether a file of the format myfile_YYYYMMDD_HHMMSS.txt exists in a particular directory. Here YYYYMMDD_HHMMSS is the time stamp, so it will be numbers always .
What is the best method to do this
I did it like this :
ls myfile_*_*.txt
but it will list files... (1 Reply)
Discussion started by: shihabvk
1 Replies
3. Shell Programming and Scripting
Hi
I have the following at the end of a service shutdown script used in part of an active-passive failover setup:
###
# Shutdown all primary Network Interfaces
# associated with failover
###
# get interface names based on IP's
# and shut them down to simulate loss of
# heartbeatd
... (1 Reply)
Discussion started by: mikie
1 Replies
4. UNIX for Advanced & Expert Users
Hi
I am new to Unix/Linux
I know commands and shell scripts which are useful for my project.
But i need to know the basics and commands and shell scripts in detail and easy guide.
Please refer a book.
Thanks
Haripatn (6 Replies)
Discussion started by: haripatn
6 Replies
5. Shell Programming and Scripting
Hi!
I need to install a application from one server to several other servers. My script would copy the install-script to other machines and run it.Since it has to be non-interactive , just wondering if yum can be used for the same.
Please let me know , if you guys are aware of other... (1 Reply)
Discussion started by: nua7
1 Replies
6. Shell Programming and Scripting
hi i need to get the values from an xml file like the <TAG> values and write to a file please suggest me the commands and some good reading material sites so that i can implement (1 Reply)
Discussion started by: perlamohan
1 Replies
7. UNIX for Advanced & Expert Users
Pls review this code and provide your feedbacks to make it more efficient.I have tried to add to each section.
Code
###############################################################
#!/bin/ksh
RRSRC=/test
RREP=/test
#Directories
test_dir=/test
#Imp Files
FILENAME=/test/files.txt
#... (5 Replies)
Discussion started by: w020637
5 Replies
8. Shell Programming and Scripting
i am jaswanth,
i am very new to unix/linux, upto now i worked in windows only., but i took coatching for unix.., and my sir teached all my classes in red hat linux and told me that all are same...!!!
I know shall programming in red hat linux..,
but now i installed opensloaris but the... (5 Replies)
Discussion started by: strgraphics
5 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I'm a beginner and am learning c programming. I want to learn UNIX/LINUX in parallel. But I don't know difference between UNIX and LINUX and where they are applied in real life. As a beginner, some people asked me to start with UNIX. Please let me know some very good books for UNIX. Also a... (6 Replies)
Discussion started by: nerdbee
6 Replies
LEARN ABOUT ULTRIX
lastcomm
lastcomm(1) General Commands Manual lastcomm(1)
Name
lastcomm - show last commands executed in reverse order
Syntax
lastcomm [command name...] [user name...] [terminal name...]
Description
The command gives information on previously executed commands. With no arguments, prints information about all the commands recorded dur-
ing the current accounting file's lifetime. If called with arguments, only accounting entries with a matching command name, user name, or
terminal name are printed. The following example produces a listing of all the executions of commands named by user root on the terminal
ttyd0:
lastcomm a.out root ttyd0
For each process entry, the following are printed:
The name of the user who ran the process.
Flags, as accumulated by the accounting facilities in the system.
The command name under which the process was called.
The amount of cpu time used by the process (in seconds).
The time the process exited.
The flags are encoded as follows:
``S'' indicates the command was executed by the super-user
``F'' indicates the command ran after a fork, but without a following exec
``C'' indicates the command was run in PDP-11 compatibility mode (VAX only)
``D'' indicates the command terminated with the generation of a core file
``X'' indicates the command was terminated with the signal SIGTERM
See Also
last(1), sigvec(2), acct(5), core(5)
lastcomm(1)