Solved

Solaris equivalent to Windows Find command

Posted on 2006-06-14
2
997 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

Suggested Solutions

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

752 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