Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Solaris equivalent to Windows Find command

Posted on 2006-06-14
2
Medium Priority
?
1,016 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 375 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
Suggested Courses

886 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