EvilZone

Other => Found it on the Webs => : Axon January 12, 2012, 01:39:10 AM

: GnuWin
: Axon January 12, 2012, 01:39:10 AM
GnuWin provides ports of tools with a GNU (http://www.gnu.org/) or similar open source license (http://gnuwin32.sourceforge.net/license.html), to modern MS-Windows (Microsoft Windows 2000 / XP / 2003 / Vista / 7)

:
http://gnuwin32.sourceforge.net/
: Re: GnuWin
: neusbeer January 12, 2012, 04:17:23 PM
I advice to run Cygwin instead with same *and more capabilities.
: Re: GnuWin
: xzid January 13, 2012, 07:12:02 AM
I used to use this + mingw for dev environment before I discovered the wonders of powershell. I dislike cygwin. Although alot of the gnu tools suck on windows.
: Re: GnuWin
: neusbeer January 13, 2012, 03:09:08 PM
powershell.. hmm.. I installed everything a while ago, but didn't have the time to learn.
why should I use pshell? it there a nice tutorial for it maybe?
: Re: GnuWin
: xzid January 13, 2012, 06:35:37 PM
Powershell kinda looks like a unix shell, but very different. They allow unix/cmd.exe aliases for their commands, so you can (ls, cp, mv) also (dir, copy, move) and use it as a normal shell. So you can use it and slowly learn powershell syntax easily(if you have previous cmd experience).

You're dealing with objects instead of text, which is the hardest part to get used to. And it uses .NET for most everything, if you inspect what "ls"(dir, gci, get-childitem) returns, you see its a [System.IO.DirectoryInfo] class:

:
PS K:\>ls | gm

   TypeName: System.IO.DirectoryInfo

Name                      MemberType     Definition
----                      ----------     ----------
Mode                      CodeProperty   System.String Mode{get=Mode;}
Create                    Method         System.Void Create(System.Security.AccessControl.DirectorySecurity director...
CreateObjRef              Method         System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
...

isn't best object to demonstrate how this can be used, so instead I'll use a single file. gi means get-item and will return a [System.IO.FileInfo]

:
PS K:\>gi test.exe


    Directory: C:\Users\Adm\K


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        16/12/2011   4:55 AM      48128 test.exe


PS K:\>(gi test.exe).Length
48128
PS K:\>(gi test.exe).Length / 1KB
47
PS K:\>(gi test.exe).fullname
C:\Users\Adm\K\test.exe

Trust me this can be very helpful. there are many more things that make powershell very fun to use.

1 thing that sucks though, you're still limited to the windows console.. so no fullscreen. although it's much better then cmd.exe, its wider and you don't have to right-click the title bar to copy/paste.

I read the book "PowerShell In Action" by the designer/creator of powershell, but it's a long read.

for websites powershellpro.com (http://www.powershellpro.com/powershell-tutorial-introduction/) looks pretty good.