Solved

Solaris equivalent to Windows Find command

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

776 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