Hey all, im switching from Linux to Windows and im trying to find some the powershell equvilents from bash. My most missed one so far is locate. Is there no easy way to find a file like "locate *.*" . What are some of your favorite PS cmdlets?
Another quick thing, I just got a motorola Q and im wondering if you guys can offer some great smartphone apps, or any recomendation.
Thanks alot guys!
-
-
Get-ChildItem would probably work for you here. Or even more simply, just use Dir (it's an alias for get-childitem).
Something like
dir * -include *.exe -recurse
would search for all .exe files and would search the current directory and all subdirectories.
Help Dir -full will give the full help for this cmdlet. -
tribalcactus wrote:Get-ChildItem would probably work for you here. Or even more simply, just use Dir (it's an alias for get-childitem).
Something like
dir * -include *.exe -recurse
would search for all .exe files and would search the current directory and all subdirectories.
Help Dir -full will give the full help for this cmdlet.
This is really a replacement for find, not locate. locate uses an index file for faster searches. We don't have an equivalent in PowerShell, AFAIK. Though I'm willing to bet there's some way to hook into desktop search for even more power than locate. -
How about this cmdlet up on codeplex?
http://www.codeplex.com/PowerShellCX/WorkItem/View.aspx?WorkItemId=4781
-
There is also "which", that is alias for get-command. This will search for reg cmdlets and exes in the path for file that hits 90% of my needs. A caching Linq provider going against the fat or ntfs table would be seem to be the high path solution.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.