10-05-2008
# w -h root | awk '{print $1,"\t",$3}'
root 25Sep0810days
root 25Sep0810days
root 25Sep0810days
does this work
Last edited by shawz; 10-05-2008 at 10:52 AM..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a console server that runs some form of UNIX/Linux, but I get a bash shell, and I want to determine how many processor (what speed) and them amount of RAM in the system. (2 Replies)
Discussion started by: bbrandeb49
2 Replies
2. HP-UX
Using HP-UX v11
Need to monitor cpu and memory usage, total for system and separately for each user in command-line mode.
Found out next ways to monitor total cpu usage under hp-ux:
1) vmstat, also shows free memory
2) sar -M
ps -eo user,pcpu - does not work, means 'user-defined format'... (4 Replies)
Discussion started by: hp-ux-user
4 Replies
3. UNIX for Dummies Questions & Answers
Hi guys.
Hopefully someone can help me.
We have a old Unix box for the accounts people. What id like to do is query it for the intranet. Trouble is im not sure what type of database the server uses.
How would i go about finding out what it is? I have complete access to the hardrive and... (2 Replies)
Discussion started by: RageMonkey
2 Replies
4. IP Networking
hi !
In my program I have a structure as shown below:
struct data
{
int a;
char *b;
long c;
}str;
i have assigned the following values to it:
strcpy(str.b,"John");
str.a=10;
str.c=123435;
The client is tryin to send struct data to the server using
send(sock,(char *... (2 Replies)
Discussion started by: mridula
2 Replies
5. Shell Programming and Scripting
cat input.sh | awk '
{
cur1=tolower($1)
cur2=tolower($2)
rsh $cur1 report | grep $cur2
} '
hi,
Have a look at the above code, the input.txt file contains two words in each line with space as delimiter, the first word is computer name and the 2nd word is file... (2 Replies)
Discussion started by: geeko
2 Replies
6. Shell Programming and Scripting
Hi , this peice of code is working for one file but not for multiple files.
Can some one please tell me the reason???
for i in `ls -1 | egrep ''SOM.*` ; do
filename=$(ls -1 $i)
filename=$(print $filename)
if ]
then
print "Skipping file $i since it already has... (1 Reply)
Discussion started by: somanath Patrud
1 Replies
7. UNIX for Dummies Questions & Answers
I have a problem. I made a script (that I am very proud of - never scripted before) that kills off idle sessions based on who -u. The problem is it is killing sessions that aren't truly idle. who -u reports them as being idle for 7 hours, when in reality they have been using a program for that... (5 Replies)
Discussion started by: raidzero
5 Replies
8. UNIX for Dummies Questions & Answers
HI guys,
:confused:i would like to know how can i determine
the total/approx memory used by a single user. Example Top output is below
===========================================================================
top - 20:00:50 up 24 days, 2:48, 2 users, load average: 0.43, 0.40, 0.37... (3 Replies)
Discussion started by: cromohawk
3 Replies
9. Shell Programming and Scripting
I'm building a script that may received start and end date as parameters. I whant to make it as flexible as possible so I'm accepting epoch and date in a way that "date --date=" command may accept. In order to know if parameter provided is an epoc or a "date --date=" string I evaluate if the value... (2 Replies)
Discussion started by: lramirev
2 Replies
LEARN ABOUT XFREE86
rpm2cpio
rpm2cpio(1) User Commands rpm2cpio(1)
NAME
rpm2cpio - convert Red Hat Package (RPM) to cpio archive
SYNOPSIS
rpm2cpio [file.rpm]
DESCRIPTION
The rpm2cpio utility converts the .rpm file specified as its sole argument to a cpio archive on standard output. (See NOTES.) If no argu-
ment is given, an rpm stream is read from standard input. In both cases, rpm2cpio will fail and print a usage message if the standard out-
put is a terminal. Therefore, the output is usually redirected to a file or piped through the cpio(1) utility.
EXAMPLES
Example 1: Converting an rpm file
example% rpm2cpio Device3Dfx-1.1-2.src.rpm | cpio -itv
CPIO archive found!
-rw-r--r-- 1 root root 2635 Sep 13 16:39 1998, 3dfx.gif
-rw-r--r-- 1 root root 11339 Sep 27 16:03 1998, Dev3Dfx.tar.gz
-rw-r--r-- 1 root root 1387 Sep 27 16:04 1998, Device3Dfx-1.1-2.spec
31 blocks
Example 2: Converting from standard input
example% rpm2cpio < Device3Dfx-1.1-2.src.rpm | cpio -itv
CPIO archive found!
-rw-r--r-- 1 root root 2635 Sep 13 16:39 1998, 3dfx.gif
-rw-r--r-- 1 root root 11339 Sep 27 16:03 1998, Dev3Dfx.tar.gz
-rw-r--r-- 1 root root 1387 Sep 27 16:04 1998, Device3Dfx-1.1-2.spec
31 blocks
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWrpm |
+-----------------------------+-----------------------------+
SEE ALSO
cpio(1), attributes(5)
NOTES
rpm2cpio handles versions 3 and 4 RPMs.
SunOS 5.10 20 Aug 2001 rpm2cpio(1)