Unix Utils for Windows
I work with unix operating systems quite a bit. So when I'm using Windows I'm often missing some of the handy little command line unix tools that are ubiquitous to unix but no where to be found on Windows.
Just today I was wanting to use the GNU find utility. The find command on unix lists all the files in a directory recursively. Its really handy because if you need to find out where a file is you just type find /path | fgrep search.file. One thing that frustrates me about the Windows search is that you have to search an entire drive - if I know the file I am looking for is in c:\windows why should I have to search the entire c:\ drive?
So I came across some Native Win32 Ports of some GNU utilities, such as find, grep (as well as fgrep, and egrep). These are nice because you can run them right from the windows command line, so no need to run in an emulator like cygwin.
One thing you need to keep in mind is that some of these utilities might have the same name as some windows utilities, you probably better off renaming these in the case of conflict. For instance Windows comes with a program called find.exe that searches for text inside a file, so I renamed the GNU find to xfind.exe.
Related Entries
- Top 20 Internet Security Vulnerabilities of 2005 - November 23, 2005
- Cheat Sheet Roundup - Over 30 Cheatsheets for developers - September 1, 2005
- SSH for Windows - December 6, 2004
- xcopy - Handy tool on windows - December 9, 2003
- FTP Scripts on windows - January 31, 2003
Trackbacks
Trackback Address: 177/894095C18CCDB08E21000D8B18BB4639
Comments
On 11/09/2004 at 11:32:40 AM EST Steve wrote:
1
There's also <HREF=http://www.cygwin.com/>cygwin</A>, which can even give you just about everything including X-Windows, gcc, apache, etc but the UnxUtils is much lighter weight on the disk.
On 11/09/2004 at 5:50:59 PM EST Dennis Spaag wrote:
2
If you're talking about the Windows search GUI, the last option under 'Look in:' is 'Browse... '
On 11/09/2004 at 7:40:17 PM EST Ian Chia wrote:
3
To search just under a folder and its subdirectories on windows, open windows explorer (windows-E) and then right click on the folder and select "Search ..." from the context menu. Voila.
On 11/09/2004 at 10:38:51 PM EST A Reader wrote:
4
take also a look at http://gnuwin32.sourceforge.net/
On 11/10/2004 at 4:21:56 AM EST the_mindstorm wrote:
5
For a more complete *nix to windows port you can try the cygwin.
On 12/13/2004 at 4:43:01 PM EST a merciless god wrote:
6
windows is really annoying sometimes, especially with me being used to using linux, as you're using a computer and it freezes, you press control+alt+f6 then control+alt+f7, and nothing happens
On 09/01/2005 at 5:31:36 AM EDT pepper wrote:
7
You don't have to search whole drive when you are searching for files. Please look in the search utility in windows again.
Your reason to use unix utils is pointless at all. If it is that you can not read or use Windows it is not the right reason.
BTW I use them also but not for simple things that can be done by windows utils.
On 09/20/2006 at 10:35:58 AM EDT davem wrote:
8
@Pepper: what an utterly pointless comment.
Pete was obviously just trying to give a simple example of a more elegant way of doing things. Have you nothing better to do than nit-pick? Who needs a "right reason" to use tools which are more powerful and they are, personally, more comfortable with?
On 10/15/2007 at 7:06:59 AM EDT Anonymous wrote:
9
"The find command on unix lists all the files in a directory recursively. Its really handy because if you need to find out where a file is you just type find /path | fgrep search.file."
As you may know or not, the 'dir' command on DOS does the same. You just have to read something called HELP (yes it is a command, try HELP DIR), and you'll see that "dir /o/s/b <pattern>" will look for pattern in current dir and its subdirectories...
On 01/30/2008 at 7:59:21 AM EST GK wrote:
10
Reg "if I know the file I am looking for is in c:\windows why should I have to search the entire c:\ drive"
As a matter of fact you can right click on the folder you want to begin the search and select search. But I haven't found the win search as reliable ..
On 04/10/2008 at 8:16:53 AM EDT Michael wrote:
11
Haha thanks. I couldn't for the life of me figure out why all the man-page and wiki-examples I tried just plain did not work, or had wrong args etc. Even though I had the foresight to rename a couple of the other binaries. In 10+ years I've never used "find" in windows. At least I'm not going crazy yet :-)
Post a Comment
Recent Entries
- Cache Template in Request Setting Explained
- What Version of Java is ColdFusion Using?
- ColdFusion 9 Performance Brief from Adobe
- Request Filtering in IIS 7 Howto
- J2EE Session Cookies on ColdFusion / JRun
- Hands on ColdFusion Security Training
- ColdFusion 9 Solr Vulnerability - Are you at Risk?
- FCKEditor Year 2010 Bug for Firefox 3.6 with ColdFusion
Your reason to use unix utils is pointless at all. If it is that you can not read or use Windows it is not the right reason.
BTW I use them also but not for simple things that can be done by windows utils.
Pete was obviously just trying to give a simple example of a more elegant way of doing things. Have you nothing better to do than nit-pick? Who needs a "right reason" to use tools which are more powerful and they are, personally, more comfortable with?
As you may know or not, the 'dir' command on DOS does the same. You just have to read something called HELP (yes it is a command, try HELP DIR), and you'll see that "dir /o/s/b <pattern>" will look for pattern in current dir and its subdirectories...
As a matter of fact you can right click on the folder you want to begin the search and select search. But I haven't found the win search as reliable ..



add to del.icio.us



