Digging into old software, or software written on different systems, often ends up resulting in a mismatch in encoding types. Given how common this can be, most flavors of Linux and macOS come with a built-in utility for converting files between various encoding types in iconv. To use it, simply provide the source format as a -f and the target format as a -t. In the below example we’ll also bring a sourcefile.txt in using the < and kick out a targetfile.txt, or the file with the source converted using a >: iconv -f KOI8-U -t utf-16 < sourcefile.txt > destinationfile.txt You could also pipe the output of an echo…
-
-
Web Server Bash One Liner for Linux or Mac
The nc (or netcat) binary is useful for a variety of TCP or UDP operations. You can open a listener, proxy connections, open a connection to another device, and port scan a device. And you can do it all through TCP and/or UDP, define ports, and scripting with nc is pretty easy. So in the below code we’ll start a while loop and then execute an echo of a header so a browser knows how to interpret what we’re sharing, which is a cat of our file. Then we’ll pipe that into netcat with a -l option so we can define the port and end the loop. while TRUE; do…
-
Jamf After Dark Podcast: Conditionally Accessing All The Things
- Mac OS X, Mac OS X Server, Mac Security, MacAdmins Podcast, The History Of Computing, The History Of Computing Podcast
The Origin Of The Blue Meanies
-
Episode 136 of MacAdmins Podcast, Bare Metal with Chris Chapman
-
Change LoginWindow Behavior in macOS
I’ve written about customizing the LoginWindow on a Mac a few times now. It’s hard to believe that I wrote https://krypted.com/mac-security/more-loginwindow-customizations-in-mac-os-x/ over ten years ago or https://krypted.com/mac-security/login-logout-hooks/ over 12 years ago. One thing I hadn’t covered is seeing the name of the computer, IP address, and version of the OS by clicking on the clock in the upper right corner of the screen. This behavior is disabled by default and once enabled shows an item for 60 seconds as you scroll through them, which is a pretty nice troubleshooting option here and there. Use the following command to active the additional information, we’ll write the HostName key into the AdminHostInfo…
-
Episode 128 of the MacAdmins Podcast: Apple’s Been Busy, with Jeremy Butcher of Apple
-
Episode 126 of the MacAdmins Podcast: WWDC After Action Report
-
Episode 125 of the MacAdmins Podcast with Frederick Abeloos
-
Differences Between zsh and bash
Supposedly, macOS 10.15 Catalina is slated to replace the default /bin/bash shell with zsh, or /bin/zsh. Before we talk about the differences let’s just say that bash is still here and if your script is called as bash then it will still work just fine. To quickly see which you’re using (e.g. when testing a new release), use $0: echo $0 Z Shell or zsh for short was written by Princeton University student Paul Falstad in 1990. Most shells are just extensions of the Bourne shell (including bash) and work similarly but there are minor differences here and there. Yes, Z Shell comes with a control-R reverse incremental search, but…