0e4thrwe01 发表于 2016-5-20 08:14:07

Unix-like utilities for Windows

  原文:http://www.geocities.com/lc_castro/winnt.htm

  
  
<!--following code added by server. PLEASE REMOVE -->
<!--preceding code added by server. PLEASE REMOVE -->



http://www.geocities.com/lc_castro/images/new.gif
Unix-like utilities for Windows
  After almost 5 years, I rewrote some of these utilities. I received emails from many
people that found them useful, and I'm glad they took the time to write me!.

  Some of the programs were updated to work with bigger capacity disks, and other were
just fixed for some security issues I found.

  The source code was cleaned and now compiles under Microsoft Visual Studio 2005
(the previous version was written on Visual Studio 6.0)

  These are some Unix-like (they are similar to some tools found in the Un*x
world) utilities that I wrote. They run in an NT/2000/XP/2003 operating systems. These tools
are command-line based.

  I have received several requests for it, so the source code is included
now. The tools are being distributed under the GNU General Public License
(GNU GPL) terms.

  You can find all these tools packed on a single file:
LCUtils.zip
.

  Note: The DOS and 16-bit Windows version are not longer supported, and I removed them
from this site
  Items with the NEW!
logo have new features.





Filename


Description


Output sample



mt.exehttp://www.geocities.com/lc_castro/images/new.gif

12-aug-2008

This is a port from the Unix "mt" command. It gives you some
control on a Tape device. It implements commands to rewind the tape, set the
block size, forward or back a specified count of blocks, erase the tape,
eject the tape, etc. It has only been tested with a DAT drive.


D:\>mt
mt - Version 1.0.1
Copyright (C) 2000-2008, Luis C. Castro Skertchly (lc_castro@yahoo.com)
Opening device \\.\TAPE0... Ok
Drive parameters:
ECC = FALSE
Compression = TRUE
DataPadding = FALSE
ReportSetMarks = TRUE
Default Block Size = 16384
Minimum Block Size = 1
Maximum Block Size = 131072
Maximum Partition Count = 2
EOT Warning Zone Size = 0
Tape parameters:
Capacity: 2000129024
Block Size: 0
Partitions: 1
Write protected: No



tapecopy.exehttp://www.geocities.com/lc_castro/images/new.gif

12-aug-2008

Makes a raw copy of a tape device. It support
writing/reading data from/to standard input/output like many Unix tools. It
can be used with the GNU tar tools to write or read tar tapes from Unix
boxes in a NT box.  Now completly in english!
(The previous version was in spanish, but
as many users of these tools are international, I decided to use english).




D:\>tapecopy
tapecopy - Version 1.5
Copyright (C) 2000-2008, Luis C. Castro Skertchly
Usage: tapecopy [-v] [-b block] [-r] -x|c [-d devname] [-f filename]
-v : Verbose
-b : Specify tape block size in bytes (0 = autodetect)
-r : Rewind tape before start
-x : Extract data from tape
-c : Copy data to tape
-d : Specify the tape device name (default = TAPE0)
-f : filename from/to where data will be copied
Valid device names are:
TAPE0
TAPE1



df.exe

26-jul-2007

Shows the free space on disk, also it shows: cluster count, cluster
size, free clusters.


D:\>df
df - Version 2.0
Copyright (C) 2000-2007, Luis C. Castro Skertchly
Drive D:
8 Sectors per cluster
512 Bytes per sector
23,039,218 Clusters
14,150,108 Free Clusters
92,156,872 KB total disk space
56,600,432 KB free




kill.exe

12-feb-2003

Terminates a process using its process ID (PID). The PID can be obtained
from the task manager process list or using the "ps.exe" or "psnt.exe"
utilities.

n/a



logoff.exe

12-feb-2003

Terminates a Windows session and optionally reboots or power down the
system.

n/a



gboot32.exe

26-jul-2007

Gets the boot record of a floppy disk or partition and writes it on a
file. Very useful to create entries at the BOOT.INI file.  



D:\>gboot32 C: BOOT.DAT
Reading boot sector from \\.\C:...
writing bootprogram BOOT.DAT...




mkboot32.exe

It creates a boot record on a floppy disk or disk partition based on a
boot-strap code in a file. Very useful to create MS-DOS boot disks from
Windows NT. In order to do that, first get a bootable DOS disk and run
"getboot.exe" to get the boot record. Then you can use "mkboot"
to write that boot record in a different disk.  



D:\>mkboot32 boot.dat A
Reading BPB from \\.\A:...
Reading bootprogram boot.dat...
Writing new boot sector on \\.\A:...




msgbox.exe

12-feb-2003

Displays a Windows Message Box and waits for the user to click the OK
button.

http://www.geocities.com/lc_castro/msgbox.jpg


ps.exe

12-feb-2003

This tool is similar to the "ps" command found on every
Unix system. It shows a list of the running processes, its Process ID (PID),
Parent Process ID (PPID), number of threads running (THR), process priority (PR),
and (when possible) the full path to the executable image.


D:\Users\Luis\VC\UTIL>ps
PS - Process list
(C) 2001, Luis C. Castro Skertchly
PIDPPIDTHR PR NAME
0    0   2   0
4    080   8 System
556    4   311 smss.exe
6245561313 csrss.exe
6485562013 winlogon.exe
69664815   9 services.exe
70864818   9 lsass.exe
86069620   8 svchost.exe
96069610   8 svchost.exe
1048696   5   8 svchost.exe
112869662   8 svchost.exe
1144696   4   8 svchost.exe
1216696   7   8 svchost.exe
127669612   8 spoolsv.exe
1392696   0   8 avp.exe
142469616   8 inetinfo.exe
1440696   5   8 mdm.exe
1468696   3   8 nvsvc32.exe
1512696   4   8 retrorun.exe
1648696   6   8 svchost.exe
1676696   6   8 symlcsvc.exe
1056 100814   8 C:\WINDOWS\Explorer.EXE
2192 1056   0   8 avp.exe
2244 1056   1   8 C:\WINDOWS\system32\ctfmon.exe
2264 1056   2   8 C:\Program Files\HDD Thermometer\HDD Thermometer.exe
2296 1056   3   8 C:\Program Files\SpeedFan\speedfan.exe
2868 3292   1   8 C:\WINDOWS\system32\notepad.exe
3036 105613   8 C:\PROGRA~1\MOZILL~1\FIREFOX.EXE
500 3292   1   8 D:\Users\Luis\VC\UTIL\ps.exe



rcopy.exe

26-jul-2007

Raw copy tool. It copies raw data from/to a device, just as if it were
just another file. It works with floppy disks, CD-ROM (reading only) and tape devices.

For Unix users, it is very similar to do:
dd if=/dev/rfloppy of=filename.dat


D:\>rcopy \\.\CDROM1 cdimage.iso
rcopy - Version 1.2
Copyright (C) 2000-2007, Luis C. Castro Skertchly
WARNING: Can't get source file size
Copying \\.\CDROM1 to disk.iso (block size = 1024 bytes)
3 MB copied...




getreg.exe

12-feb-2003

Gets a Registry key value from the command-line interface. Useful when
writing batch scripts.


D:\>getreg LM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CSDVersion
Service Pack 5




setreg.exe

12-feb-2003

Sets a Registry key value from the command-line interface. Useful when
writing batch scripts. To change the default IE download directory run:


D:\>setreg CU "Software\Microsoft\Internet Explorer" "Download Directory" D:\DOWN



which.exe

27-jul-2007

Searches an executable file in the PATH and prints its current location.


D:\>which dnsadmin
D:\WINNT\system32\dnsadmin.exe



wmem.exe

26-jul-2007

Displays statics about memory usage, processor type and speed and
Windows directories location.


D:\>wmem
37% Memory utilization
Total physical memory:      1,046,252 Kb
Phys. memory available:         653,728 Kb
Page file size:               2,129,864 Kb
Available in page file:       1,822,220 Kb
Virtual Memory size:          2,097,024 Kb
Free Virtual Memory:          2,084,124 Kb
Page size:                        4,096 bytes
Minimum Appl. Address:       0x00010000
Maximum Appl. Address:       0x7ffeffff
Number of processors:               2
Allocation Granularity:          65,536 bytes
Processor: Intel2593 MHz Pentium Family 15 Model 2 Stepping 9
C:\WINDOWS is Windows directory
C:\WINDOWS\system32 is System directory




wver.exe

26-may-2003

Displays Windows version


D:\>wver
Microsoft Windows NT 4.0 (Build 1381) Service Pack 5
D:\>wver
Microsoft Windows XP Professional (Build 2600) Service Pack 2




  
Last modification: August 12, 2008

Previous modification: September 23, 2007

Previous modification: December 13, 2002

Luis Carlos Castro Skertchly
lc_castro@yahoo.com




<!--text below generated by server. PLEASE REMOVE -->  
<script src="http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script src="http://us.js2.yimg.com/us.js.yimg.com/lib/smb/js/hosting/cp/js_source/geov2_001.js"></script><script>geovisit();</script>http://visit.geocities.com/visit.gif?&r=http%3A//www.google.com/search%3Fhl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla%253Azh-CN%253Aofficial%26hs%3DIYR%26newwindow%3D1%26q%3Dwindows+Kill%25E3%2580%2582exe%26aq%3Df%26oq%3D%26aqi%3D&b=Netscape%205.0%20%28Windows%3B%20zh-CN%29&s=1280x1024&o=Win32&c=32&j=true&v=1.2

<noscript>&lt;img src="http://visit.geocities.yahoo.com/visit.gif?us1255060102" alt="setstats" border="0" width="1" height="1"&gt;</noscript>  
http://geo.yahoo.com/serv?s=76001544&t=1255060102&f=us-w8
页: [1]
查看完整版本: Unix-like utilities for Windows