Re: Problem with netstat -p



Thank you very much. Now I know, after searching for that "2>", that
is the way to redirect the STDERR.
Thanks again,
Germán.

On 19 mayo, 06:40, mop2 <mop2bky4mz5tyjwa8ersp7hrg5u...@xxxxxxxxx>
wrote:
Germán wrote:
Hi all, I'm having a problem using netstat -tap in a Bash Script. I
need to grep for sockets of the current user, in the current terminal
and that are ESTABLISHED. For them I need their associated process PID
to kill the processes after that, so I use -p. Well, the problem comes
because I'm not root and every time I use netstat with -p in the
script, it prints in the screen the annoying message (Not all
processes could be identified, non-owned process info will not be
shown, you would have to be root to see it all.).
I don't need to be root because I only want to see the processes of
the current user and it's working fine because it shows them. But, I
don't know how to hide that message that is appearing always in
STDOUT. I tried redirecting the output to a file, to /dev/null,
running it in background, etc. and it is always showed. I looked in
the man page of netstat, but I didn't find any way to hide that
warning.
Thank you in advance and I hope you can help me with this.

I think you need this:
netstat -p 2>/dev/null- Ocultar texto de la cita -

- Mostrar texto de la cita -

.



Relevant Pages

  • Problem with netstat -p
    ... I'm having a problem using netstat -tap in a Bash Script. ... it prints in the screen the annoying message (Not all ... you would have to be root to see it all.). ...
    (comp.unix.shell)
  • Re: help on exchange webmail
    ... in the root that is a redirect and assign it as default document). ... > I have recently installed Microsoft Small Business Server 2003 Premium ... > the Web mail looks like Outlook Web Mail. ...
    (microsoft.public.exchange.clients)
  • RE: Redirection
    ... Let them point remote.mycompany.com to your RWW server root i.e. ... /remote directory it put a index page that will immidiately redirect the user ...
    (microsoft.public.inetserver.iis)
  • Re: Redirecting Users...
    ... root portal page to redirect the user (you would hav eto have logic to ... the root site from another page). ... Microsoft MVP - SharePoint Portal Server ... > Also, I have this simple form for login the OWA WebParts, is it possible ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Port security manager panel ??
    ... firewall then he could use netstat to monitor (and even redirect its ...
    (microsoft.public.security)