Posts

Showing posts with the label UNIX

SSH: 1995

Image
I was today years old when I learned that SSH wasn’t a thing until around the summer of 1995 ! (I first learned about it the summer of 1997, when I was at HIP and all the l33t haxxors were sniffing my telnet sessions.) Wonder if I can run SSHeven on my PowerBook...  I’m reasonably sure I used F-Secure’s SSH client on my System 7.5.5 Mac back in the day? Though it could have been Nifty Telnet or ...  And it was definitely Tera Term and later Putty on my Windows machines, before I went back to Mac circa OS X Panther on an iBook G3 (IIRC a 600 MHz model ?). (As a native UNIX , of course, OS X had SSH built in, accessible from any terminal window.) And when setting up a new Solaris 8 machine, our first stop would always be sunfreeware.net to download OpenSSL and OpenSSH. macOS shell in cool-retro-term

Monitoring and restarting Derby

Image
A terminal window It’s a crude but working hack; I’ve been spinning a similar script since the mid-90s (then monitoring the PPP connection that kept an entire dorm connected, very slowly, to the Internet). Bash script . Every hour (run via cron) it just checks the process list to see if the Derby instance is up and, if not, spawns a new screen session with the Derby instance running in the background. (Every hour is fine for this application, which only hits the database periodically. I’d tweak it to run in a constant loop if the Derby instance was more critical. I’d also question why I was running something critical on Derby in such a context, too.

Making an executable PHP script

Image
Super basic, and I don’t know why I’ve never done this before; a PHP script can be run in a UNIX or Linux (etc) terminal session (etc) just like a BASH script or other standard UNIX shell script: % cat php_script #!/usr/bin/env php <?php print "Arguments:\n"; print_r($argv); % chmod 755 php_script % ./php_script fnord ranger Arguments: Array (     [0] => ./php_script     [1] => fnord     [2] => ranger )

Apple makes a great UNIX®

Image
From the earliest days of Mac OS X, Apple has touted its UNIX®-like nature. Introducing Darwin, Steve Jobs made a point of describing Darwin as “very Linux-like” when introducing OS X during the January 5, 2000 keynote speech at MacWorld San Francisco. (Though I’m sure more than a few geeks gnashed their teeth at Apple’s iCEO describing the new kernel the way he did: “It’s very Linux-like. Very much so. It’s got FreeBSD UNIX, which is the same as Linux.” 🤦) But I digress. Anyway. To this day, Apple acknowledges the UNIX (and UNIX-like) origins of its operating system: “Darwin is based on proven technology from many sources. A large portion of this technology is derived from FreeBSD, a version of 4.4BSD that offers advanced networking, performance, security, and compatibility features. Other parts of the system software, such as Mach, are based on technology previously used in Apple’s MkLinux project, in OS X Server, and in technology acquired from NeXT. ... BSD is a caref...