UnixKit-tiny

11/11/2012 Quad Lasers is now gone & the Wayback Machine can’t display the page due to a robots.txt so here’s the readme.txt file & a link to download a copy of  unix-kit.zip.

Download for unixkit-tiny

These utilities were gleaned from:

http://gnuwin32.sourceforge.net
Source of most of the non-archiver stuff, plus the archivers ‘arc’,
‘arj’, ‘bzip2’, ‘gzip’, ‘tar’, ‘zip’ and ‘unzip’.

http://unxutils.sourceforge.net
zsh (they call it sh.exe, but it’s apparently zsh),
grep, find

http://upx.sourceforge.net/
UPX, used to compress binaries for the ‘tiny’ versions of this kit

http://www.activestate.com/
ActivePerl, featured in some versions of this kit

http://www.nano-editor.org/dist/v1.2/NT/nano-1.2.3.zip
nano

http://www.thomer.com/vi/vi.html#versions
xvi (here presented as ‘vi.exe’)

http://uemacs.tripod.com/nojavasc.html#BIN
microemacs (here presented as “emacs.exe”)

http://www.rarlab.com/rar_add.htm
unrar

http://www.fatsquirrel.org/veghead/software/windos/
more

and myself (J. L. Blank <jlb@twu.net>):
Idea, packaging, clever use of ‘upx’ to compress binaries for the
‘tiny’ versions, and need for a simple Unixlike system I could carry
around on my USB thumb-drive and take to Windows-using clients’… 🙂

—————————————-

NOTES ON THE ‘TINY’ VERSION:

This ‘tiny’ version has all the .exes and .dlls compressed by upx… well,
all of those that don’t seem to screw up when compressed in this manner. 🙂

It also does not have:

* emacs
* upx
* bzcat (redundant with ‘bunzip2’)
* zcat (redundant with ‘gunzip’)
* more (redundant with ‘less’)
* dir, vdir, dircolors (redundant with ‘ls’ 🙂 )
* sum, sha1sum (redundant with ‘cksum’ and ‘md5sum’)
* shar, unshar, mailshar (why you would need this in Windows is
beyond me)
* arj-register (I doubt anyone will register this)
* arjdisp (lesser-known and probably not needed. Most people simply want
a way to extract arjes, not a fancy interface for it.)
* mkfifo, mknod (pretty useless under Windows)
* install (the whole point of Unix-Kit is to NOT install things… certainly
someone walking around with a copy of Unix-Kit-Tiny on a USB thumb drive
won’t want to use this on client machines 🙂 )
* diff3 (redundant with diff)
* lessecho (less-er known. Ha ha! A joke. Probably not widely used.)
* lesskey (lesser known; probably won’t work right under Windows anyhow)
* zipsplit (probably not needed in this situation; you can use ‘split’ anyhow,
no?)
* zipcloak, zipnote (I don’t even know what these DO)
* rearj (ho hum)
* lzop (REALLY obscure and probably not used by the average Unix geek)
* ginstall (what the heck is this?)
* tree (lesser-used; you can just use ‘ls -lR’ or ‘find’)
* expand (use this instead: tr ‘\t’ ‘ ‘)
* unexpand (use this instead: tr ‘ ‘ ‘\t’)
* chgrp (probably totally useless in Windows anyhow)
* cmp (use ‘diff’)
* marc
* ptx (obscure and probably unused by 99.99% of Unix geeks)
* sdiff (lesser-known and probably virtually unused)
* all locales except en_GB (sorry, international folks!)
* od (why you’d use this in Windows is beyond me)
* comm (probably redundant with ‘diff’ and ‘uniq’ anyhow)

UnixKit for Windows is a toolkit of Unixlike programs for Microsoft Windows. Unlike CygWin, it does not require installation. In fact, it leaves absolutely no traces on the host machine when you’re done using it.The -tiny branch presently includes:arc arj bash bunzip2 bzip2 bzip2recover cat chmod cksum cp csplit cut dd df diff du file find fmt fold funzip grep gunzip gzip head join less ln ls md5sum mkdir more mv nano nl paste patch pico pr rm rmdir sed sort split stat tac tail tar touch tr tsort uniq unrar unzip uudecode uuencode vi wc wget zip zsh

It looks like the original link to this site http://jlb.twu.net/code/unixkit.php is no longer working, however, thanks to the magic of the Wayback Machine you can click here to see the original page and visit Quad Lasers to download.

Update 02/09/2008:

Also check out GnuWin32 and UnxUtils.

Time & Date stamp for batch files

This has been driving me crazy – how to get a decent Time & Date stamp in a batch file. After much Googling and experimenting I came up with this. 

This was tested on XP Pro with English (United States) Regional Settings and will likely not work if your Regional Settings are different. Take a look at the comments from d_m_g_3 below for a Region (United Kingdom) version that does work.

If you’ve tried this and found a way to make it work with your Regional Settings, please leave a comment below with the Region & code you got working to save someone else the headache of figuring it out!

SET TimeStamp=
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do set datestr=%%l%%j%%k
for /f "tokens=1-4 delims=.: " %%i in ("%time%") do set timestr=%%i%%j%%k%%l
SET TimeStamp=%datestr%%timestr%

It sets the environment variable TimeStamp to the format YYYYMMDDHHMMSSmm.

As soon as I can back track to where I got the bulk of this, I’ll post appropriate credit.

02/19/2012 Update:

I found another approach at Print Date/Time in DOS Batch File that works well for me most of the time, but does have an issue with using a leading space for single digit hours. DOS’s ReName has a problem with that so I’ve settled on just using the DATESTAMP variable – it’s close enough for most of my needs.

Create a date and time stamp in your batch files uses a slightly different approach with SUBSTRING to extract the parts and also explains how to use TRIM to get around the leading space problem.

30 Ways To Keep A Healthy Level of Insanity

  1. Page yourself over the intercom. (Don’t disguise your voice.)
  2. Find out where your boss shops and buy exactly the same outfits. Always wear them one day after your boss does. (This is especially effective if your boss is a different gender than you are.)
  3. Send email to the rest of the company telling them what you’re doing. For example “If anyone needs me, I’ll be in the bathroom.”
  4. “Hi-lite” your shoes. Tell people that you haven’t lost your shoes since you did this.
  5. While sitting at your desk, soak your fingers in “Palmolive.”
  6. Put up mosquito netting around your cubicle.
  7. Every time someone asks you to do something, ask them if they want fries with that.
  8. Put your garbage can on your desk. Label it “IN.”
  9. Determine how many cups of coffee is “too many.”
  10. Put decaf in the coffee maker for 3 weeks. Once everyone has gotten over their caffeine addictions, switch to espresso.
  11. Leave the copy machine set to reduce 200%, extra dark 17 inch paper, 99 copies.
  12. In the memo field of all your checks, write “for sexual favors.”
  13. If you have a glass eye, tap on it occasionally with your pen while talking to others.
  14. When driving colleagues around insist on keeping your car windshield wipers running in all weather conditions “to keep ’em tuned up.”
  15. Reply to everything someone says with “that’s what YOU think?”
  16. Practice making fax and modem noises.
  17. Make beeping noises when a large person backs up.
  18. Finish all your sentences with the words “in accordance with prophesy.”
  19. Signal that a conversation is over by clamping your hands over your ears and grimacing.
  20. Shout random numbers while someone is counting.
  21. Staple papers in the middle of the page.
  22. Publicly investigate just how slowly you can make a croaking noise.
  23. TYPE ONLY IN UPPERCASE..
    1. type only in lowercase
    2. Dont use any punctuation either
  24. Repeat the following conversation a few times: “Do you hear that?” “What?” “Never mind, it’s gone now.”
  25. As much as possible, skip rather than walk.
  26. When nearly done, announce “no, wait, I messed it up,” and repeat.
  27. Ask people what gender they are.
  28. While making presentations, occasionally bob your head like a parakeet.
  29. Sit in the parking lot at lunch time pointing a hair dryer at passing cars to see if they slow down
  30. Ask your co-workers mysterious questions and then scribble their answers in a notebook. Mutter something about “psychological profiles”.

PDA’s, Planners, and other nonsense

It is amazing to me that millions of us are still using the same technology that Benjamin Franklin used to keep track of our appointments, contacts, and goals. In 200 years, we’ve advanced to pre-printed pages, fancy binders and ball-point pens…

Read the rest of this entry »