Not Always Black & White The terminal emulator that ships with macOS is, by default, a black (background) and white (text) affair. In addition to a bland aesthetic, this lack of color has practical implications for the user.
Seek and Destroy Sed--the stream editor--can read, then modify text on the fly. While the syntax for sed appears cryptic at first blush, it is a versatile text-processing tool worth adding to your UNIX utility belt.
"If You Only Knew the Power of the Command Line!" At its core, the command line interface (CLI) grants users control over complex systems, and allows for the automation of tasks that would otherwise be cumbersome to manage manually. What follows is a
Colon Cleaner Here's a quick-and-dirty bash snippet that recursively locates all files ending with the .npy extension, and then replaces occurrences of a colon(:) with a dash (-) in their filename . For reference: find ./ -depth
Faster Than a Speeding Bullet? Speed Test by Ookla is a web service that measures Internet connection performance metrics like download/upload rate, latency, and packet loss. The company offers a browser-based test, as well as several dedicated
Automating the Boring Stuff, Too In our last post we discussed using Bash to transform data in one format to an arrangement suitable for import in to Google Groups. Now, let's take a soup-to-nuts look at the process.
Automating the Boring Stuff In his book: "Automating the Boring Stuff", Al Sweigart details how to automate boring, repetitive digital tasks using the Python programming language. A job that could take hours of manual work,
No Hangups In a previous post we detailed how to archive data "on-the-fly" from a local source to a remote destination, using the utilities tar, ssh, and cat. Today, we'll add nohup to
Mail It In Setup Sendmail in GNU/Linux Scope: Set up a general-purpose internetwork routing facility that supports Simple Mail Transfer Protocol (SMTP). Dependencies Install these packages first, per your operating system (OS): Fedora, CentOS Debian,
A Safety Net for Your Shell For the risk-averse among us, here are a few aliases that can reside in your shell initialization as insurance against the accidental removal of a file(s) or folder(s): alias cp="
Tar From Afar One benefit of working from a terminal emulator is the ability to chain commands together in a way that would be difficult to do efficiently from a GUI. For example, the following snippet
UIDs + 1 Here's a quick code snippet for use in extracting the current highest user identifier (UID) in GNU/Linux using awk to do so. For reference: a UID is the unique value your UNIX-like
Creating Default Directory Structure in GNU/Linux In a previous post, we shared a Bash shell script for creating local user accounts in GNU/Linux. As is often the case, the process of drafting this script yielded a number of
Passing Secrets When Adding Users in GNU/Linux For those running multi-user GNU/Linux instances not bound to a network identity management tool, there are a number of ways to provision local user accounts. As we're a fan of automating repetitive
(W)get at the Truth In a previous post, we discussed HTTP response codes, and shared a snippet for using curl to extract a website's response code for the purpose of checking if that site was accessible. Today,
Bulky: A Bash One-liner to Rename Files En Masse "If a task is worth doing more than once, it's worth automating." -- Rando Lazy Programmer We were recently contacted with a straight-forward request: replace a portion of all file names
Host-Busters For those who manage multi-instance environments, providing a descriptive identifier, i.e. a hostname, to each node on a network may be of some utility. Once you've developed a naming convention that makes
Curling HTTP Status Codes for Gains When a client makes a request to a web site asking it to "serve" a given web page, an HTTP response code is generated by the server, indicating the status of
A Tar in Progress In Linux, the tar ("tape archive") command allows for the creation and extraction of archive files. Originally created to store file systems on to magnetic tape data storage, tar is commonly
Config, an SSH Shortcut For those of you connecting to multiple instances via SSH, setting up a local configuration file can save you the effort of having to keep track of things like: host names, user names,
Command Line Analytics, Part II In a previous post, we took a look at the critical role log files play in administering servers, and also dissected the content of an Nginx access log. With that information in mind,
Command Line Analytics, Part I If you are at all interested in the activity or performance of a web server under your charge, it is vital that you become familiar with the contents of /var/log. For your
A Foxy Proxy: Local Port Forwarding via Firefox You may, on occasion, find yourself tethered to an insecure network or behind a firewall that restricts passage to a website. If you have access to an external network and a configured client
Freak it, we'll do it live! Welcome to the geekberg.info fiefdom. As our tagline suggests, we'd like for this site to serve as a gathering place for concise, functional tutorials of interest to "geeks". Frequently, when