Solved

Solaris equivalent to Windows Find command

Posted on 2006-06-14
2
1,004 Views
Last Modified: 2013-12-05
I am new to Unix and want to know the unix equivalent for the windows find command?

In otherwords, on Unix/Solaris 8 if I issue a command that displays text to the screen--On unix how do I:

1. Pass that output to another command?
2. What command will filter the results to only display lines with text ??

For example on Windows I would issue  the command:

            netstat | find ":5605"

To find only those connections on port 5605.

I would like the syntax for doing the same thing on Solaris 8.
0
Comment
Question by:J_A_Donaldson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 125 total points
ID: 16905541
That would be the 'grep' command (get regular expression and print).  grep can search for complex expressions in its input.  But in your case you are looking for a simple string:

            netstat | grep ":5605"


Note that Unix has its own 'find' command that does something very different - it searches for files in the file system that match certain criteria.



0
 
LVL 6

Expert Comment

by:JJSmith
ID: 16946303


The 'find' in UNIX is like the windoze 'DIR /S /B'

Cheers
JJ

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question