This forum is in archive mode. You will not be able to post new content.

Author Topic: GnuWin  (Read 1443 times)

0 Members and 2 Guests are viewing this topic.

Offline Axon

  • VIP
  • King
  • *
  • Posts: 2047
  • Cookies: 319
    • View Profile
GnuWin
« on: January 12, 2012, 01:39:10 AM »
GnuWin provides ports of tools with a GNU or similar open source license, to modern MS-Windows (Microsoft Windows 2000 / XP / 2003 / Vista / 7)

Code: [Select]
http://gnuwin32.sourceforge.net/

Offline neusbeer

  • Knight
  • **
  • Posts: 223
  • Cookies: 11
  • Beer makes you stronger XD
    • View Profile
    • http://www.facebook.nl/hackneus
Re: GnuWin
« Reply #1 on: January 12, 2012, 04:17:23 PM »
I advice to run Cygwin instead with same *and more capabilities.
--Neusbeer

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: GnuWin
« Reply #2 on: 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.

Offline neusbeer

  • Knight
  • **
  • Posts: 223
  • Cookies: 11
  • Beer makes you stronger XD
    • View Profile
    • http://www.facebook.nl/hackneus
Re: GnuWin
« Reply #3 on: 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?
--Neusbeer

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: GnuWin
« Reply #4 on: 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:

Code: [Select]
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]

Code: [Select]
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 looks pretty good.
« Last Edit: January 13, 2012, 06:49:04 PM by xzid »

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.