01-16-2012
Quote:
Originally Posted by
askandstudy
My question was not to display the past user logins.
My question is:
How can I tell which network protocol (SSH, telnet, etc) users who are not logged in have been using?
Thank you in advance.
~M.G
7 More Discussions You Might Find Interesting
1. IP Networking
I have a small program written in C using winsock v1, that uses a unix host to get the time.
I have two machines networked, one windows, the other red hat 9.
The windows machine will request the time off the RH one.
How can I configure red hat to reply to the time request, i.e act as an... (1 Reply)
Discussion started by: jaredGalen
1 Replies
2. OS X (Apple)
by default, a mac syncs its time and date with time.apple.com (located system prefs->Date&Time). Is there a way in unix to change it to another address?
my attempts to use ntpdate and ntpd have failed. (4 Replies)
Discussion started by: CBarraford
4 Replies
3. Shell Programming and Scripting
Hi,
Is there any command for showing offline users?
The only way I can think of doing it (as i cant find a command) is getting a list of all the online users, and comparing it to /etc/passwd, anything that is in /etc/passwd and not in the users file will be offline users. But I have no... (4 Replies)
Discussion started by: mikejreading
4 Replies
4. Shell Programming and Scripting
Hi! I'm new in scripting and I need some help with one simple script. I have to write a program that shows in a predetermined period (using "last" command), to draw up a list of users who have used the machine during this period. Each user to indicate how many sessions it has been during this... (9 Replies)
Discussion started by: vassu
9 Replies
5. Shell Programming and Scripting
Hi guys,
i want to know about network protocol testing.
1. What is network protocol testing?
2. Whats the role of network protocol tester?
3. Is there good future scope in network protocol testing field?
4. Just give me a example of protocol testing.
5. How it relates to perl or unix?
Thanks... (0 Replies)
Discussion started by: rangarasan
0 Replies
6. Red Hat
Hi All,
I work in a multi user environment where my school uses Red Hat Linux server. When I issue commands such as "top" or "users", I get to see what others are doing and what kinds of applications they are running (even ps -aux will give such information). "users" will let me know who else is... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
7. Solaris
on both of my T2000 I am seeing same values of 100Mbps for e1000g0 ethernet port.
i know all four ethernet ports on T2000 are gigabit ports so why is my first link showing as 100Mbps and how can i correct it?
# dladm show-dev
e1000g0 link: up speed: 100 Mbps ... (1 Reply)
Discussion started by: aliyesami
1 Replies
LEARN ABOUT CENTOS
shell-quote
SHELL-QUOTE(1) User Contributed Perl Documentation SHELL-QUOTE(1)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.16.3 2010-06-11 SHELL-QUOTE(1)