Solved

Solaris equivalent to Windows Find command

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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 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 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.:

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now