发新话题
打印

[转载]带一些小工具给大家(for win32 only)

[转载]带一些小工具给大家(for win32 only)

信息来源:邪恶八进制信息安全团队(www.eviloctal.com

Unix Shell下一些可移植的小工具

C:\Documents and Settings\Administrator\Desktop\sbin>ls -l
total 1574
-rwxrwxrwx  1 user    group    147456 Apr 14  2003 agrep.exe
-rwxrwxrwx  1 user    group     22016 Nov 11  1999 cat.exe
-rwxrwxrwx  1 user    group     68096 Nov 11  2001 diff.exe
-rwxrwxrwx  1 user    group     17920 Nov 11  2001 diff3.exe
-rwxrwxrwx  1 user    group     16896 Nov 11  2001 dirname.exe
-rwxrwxrwx  1 user    group      7680 Nov 11  1999 echo.exe
-rwxrwxrwx  1 user    group     80412 Apr 14  2003 egrep.exe
-rwxrwxrwx  1 user    group      8192 Oct 10  2000 env.exe
-rwxrwxrwx  1 user    group     80412 Apr 14  2003 fgrep.exe
-rwxrwxrwx  1 user    group     65536 Nov 11  2001 find.exe
-rwxrwxrwx  1 user    group    195584 Apr 14  2003 gawk.exe
-rwxrwxrwx  1 user    group     80412 Apr 14  2003 grep.exe
-rwxrwxrwx  1 user    group     57856 Nov 11  1999 ls.exe
-rwxrwxrwx  1 user    group     59904 Nov 11  1999 patch.exe
-rwxrwxrwx  1 user    group     65536 Oct 10  2000 rm.exe
-rwxrwxrwx  1 user    group     49152 Apr 14  2003 sed.exe
-rwxrwxrwx  1 user    group     16384 Nov 11  1999 sleep.exe
-rwxrwxrwx  1 user    group     38400 Nov 11  1999 sort.exe
-rwxrwxrwx  1 user    group     35328 Nov 11  1999 tail.exe
-rwxrwxrwx  1 user    group     23552 Nov 11  1999 uniq.exe
-rwxrwxrwx  1 user    group     29696 Nov 11  1999 wc.exe
-rwxrwxrwx  1 user    group    324608 Sep 12 22:50 wget.exe
-rwxrwxrwx  1 user    group     45124 Oct 10  2000 xargs.exe
-rwxrwxrwx  1 user    group     68096 Apr 14  2003 zip.exe

C:\Documents and Settings\Administrator\Desktop\sbin>zip sbin.zip *
  adding: agrep.exe (152 bytes security) (deflated 64%)
  adding: cat.exe (152 bytes security) (deflated 51%)
  adding: diff.exe (152 bytes security) (deflated 50%)
  adding: diff3.exe (152 bytes security) (deflated 51%)
  adding: dirname.exe (152 bytes security) (deflated 51%)
  adding: echo.exe (152 bytes security) (deflated 56%)
  adding: egrep.exe (152 bytes security) (deflated 49%)
  adding: env.exe (152 bytes security) (deflated 54%)
  adding: fgrep.exe (152 bytes security) (deflated 49%)
  adding: find.exe (152 bytes security) (deflated 55%)
  adding: gawk.exe (152 bytes security) (deflated 54%)
  adding: grep.exe (152 bytes security) (deflated 49%)
  adding: ls.exe (152 bytes security) (deflated 55%)
  adding: patch.exe (152 bytes security) (deflated 51%)
  adding: rm.exe (152 bytes security) (deflated 53%)
  adding: sed.exe (152 bytes security) (deflated 52%)
  adding: sleep.exe (152 bytes security) (deflated 54%)
  adding: sort.exe (152 bytes security) (deflated 50%)
  adding: tail.exe (152 bytes security) (deflated 52%)
  adding: uniq.exe (152 bytes security) (deflated 52%)
  adding: wc.exe (152 bytes security) (deflated 53%)
  adding: wget.exe (152 bytes security) (deflated 2%)
  adding: xargs.exe (152 bytes security) (deflated 73%)
  adding: zip.exe (152 bytes security) (deflated 49%)


Unix下的一些Shell常用的命令。详细使用方法请加参数 --help 察看。来源于http://unxutils.sourceforge.net/,选了几个常用的。

Unix Shell 初体验,给出两个简单管道流的例子

C:\Documents and Settings\Administrator\Desktop\sbin>netstat -an | gawk "{ print $2,$3 }" | sort


C:\Documents and Settings\Administrator\Desktop\sbin>cat yourfile | egrep [要匹配的正则表达式]

你还可以把你 tail 日志文件流适时输出到屏幕,等等.自己发挥吧

附件

sbin.zip (893 KB)

2005-9-12 23:24, 下载次数: 436

幸福,那就是……我饿了,看别人手里拿个肉包子,那他就比我幸福;我冷了,看别人穿了一件厚棉袄,他就比我幸福;我想上茅房,就一个坑,你蹲那了,你就比我幸福。

TOP

发新话题