02-24-2011
Quote:
Originally Posted by
samsungsamsung
Hi
Can I do that or will it impact anything ?
you can do it. it will not harm anything. /etc/services is just a file to map ports/service names/protocols.
This User Gave Thanks to frank_rizzo For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
Is it possible to remove/disconnect a socket connection having
a status of LISTEN, from command prompt..??
Thanks in Advance.. (1 Reply)
Discussion started by: shibz
1 Replies
2. UNIX for Dummies Questions & Answers
hello all,
in order for me to close ports and remove services that could be a danger to my system i have edited the /etc/initd.conf file, /etc/system file, and renamed some of the r commands. However i wanted to know if anyone knows how to turn off all services and close ALL known ports, so i... (3 Replies)
Discussion started by: Holistic
3 Replies
3. UNIX for Dummies Questions & Answers
I have an application service running on an AIX server
Client application is able to connect to the server machine.
Strange thing is
when i do "netstat -a | grep servicename" I get no output
but
when i do "ps -ef | grep service name", I am able to see the service running
I... (1 Reply)
Discussion started by: bryan
1 Replies
4. HP-UX
Hi,
We are running HP-UX 11.11 in trusted mode. We have a audit scheduled next week and I have been given the resp. to check all the network servies and other user maintenance things.
Is there any HP document which states which services can be easily disabled and how. Like ftp, finger etc.... (1 Reply)
Discussion started by: isingh786
1 Replies
5. Windows & DOS: Issues & Discussions
I just installed Services for Unix on a Windows 2003 DC. I have a Debian box with Samba shares for our storage drive. I'm trying to test a Linux client.
She is unable to read or write from the Samba shares. Her login is being mapped to the same name from NIS to AD. She can login from a windows... (0 Replies)
Discussion started by: dawningtech
0 Replies
6. UNIX for Dummies Questions & Answers
hi,
what is the command for checking the particular services and how can we find whether that service is up or down. Consider http service. how to check whether its up or down
Edit: Question continued here. (0 Replies)
Discussion started by: satheeshkr_cse
0 Replies
7. Solaris
Need help from the unix admins out there. I am trying to telnet from a windoze machine to a sun machine. It won't let me connect. I looked at etc/services and I found the port that telnet was listening on. But, how can I tell if its actually up and available? is there a unix command I can issue?... (15 Replies)
Discussion started by: Harleyrci
15 Replies
8. Red Hat
I had a doubt if any services need to be restarted if port no in /etc/services in an RHEL setup is changed. For eg, the port no of 443 for SSL may need to be changed.
I hope my query is clear whether any services need to be restarted if port no in /etc/services is changed.
Please revert with... (10 Replies)
Discussion started by: RHCE
10 Replies
9. Shell Programming and Scripting
Hi,
I just started working on a script. After my research, i found a command which can help me:
AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2.
So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies
LEARN ABOUT DEBIAN
shell-quote
SHELL-QUOTE(1p) User Contributed Perl Documentation SHELL-QUOTE(1p)
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.8.4 2005-05-03 SHELL-QUOTE(1p)