Okay, this works for me when I feed it your last output on stdin:
A pure awk solution might be more elegant but the necessary string operations seem much easier in the shell.
Last edited by Corona688; 02-17-2011 at 02:14 PM..
the method to find out the all the user who are the current user of the system?
i tried with the who. but with that i receive the TTY like something. (3 Replies)
Hi
I am using mailx to send email and am wondering if there is a way I can send the email from a different user than the user logged in.
something like do-not-reply@xyz.com
Thank you. (1 Reply)
Hello,
i know who command gives you the time when particular user logged in. And subtracting today's date and time from the one found in who we can get how much time user logged in. But this can get very much clumsy as we can't subtract date directly in unix . Is there any other way or command... (4 Replies)
How do I confirm if a user logged in, is remote or local? In the case if the user is remote, how to be sure what authentication/method is it using, like LDAP, NIS or other? (2 Replies)
Hey guys
I need a script that reads a login name and verifies if that user is currently logged in
i have found few commands like "who" and "users"
but i wonder how can i verify it that login name is logged in or not? (3 Replies)
hi!
How can I find into:
/var/log/messages.4
/var/log/messages.3
/var/log/messages.2
/var/log/messages.1
/var/log/messages
The last user do a login? (for example user1)
My idea is to search by the pattern "Accepted password for" buy I necessary search into all files first and in the... (2 Replies)
Hi All,
We use putty to connect to a unix box. We want to identify the folks involved in running certain shell scripts on the server.
I want to identify the windows user id of those folks who have logged through Putty to run the scripts.As unix-id is shared by more than two folks, tracking... (3 Replies)
Discussion started by: mdkareemuddin
3 Replies
LEARN ABOUT MINIX
timeout
TIMEOUT(1) User Commands TIMEOUT(1)NAME
timeout - run a command with a time limit
SYNOPSIS
timeout [OPTION] DURATION COMMAND [ARG]...
timeout [OPTION]
DESCRIPTION
Start COMMAND, and kill it if still running after DURATION.
Mandatory arguments to long options are mandatory for short options too.
--preserve-status
exit with the same status as COMMAND, even when the
command times out
--foreground
when not running timeout directly from a shell prompt,
allow COMMAND to read from the TTY and get TTY signals; in this mode, children of COMMAND will not be timed out
-k, --kill-after=DURATION
also send a KILL signal if COMMAND is still running
this long after the initial signal was sent
-s, --signal=SIGNAL
specify the signal to be sent on timeout;
SIGNAL may be a name like 'HUP' or a number; see 'kill -l' for a list of signals
--help
display this help and exit
--version
output version information and exit
DURATION is a floating point number with an optional suffix: 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
If the command times out, and --preserve-status is not set, then exit with status 124. Otherwise, exit with the status of COMMAND. If no
signal is specified, send the TERM signal upon timeout. The TERM signal kills any process that does not block or catch that signal. It
may be necessary to use the KILL (9) signal, since this signal cannot be caught, in which case the exit status is 128+9 rather than 124.
BUGS
Some platforms don't currently support timeouts beyond the year 2038.
AUTHOR
Written by Padraig Brady.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report timeout translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO kill(1)
Full documentation at: <http://www.gnu.org/software/coreutils/timeout>
or available locally via: info '(coreutils) timeout invocation'
GNU coreutils 8.28 January 2018 TIMEOUT(1)