WP-CLI is the command-line interface for WordPress. It allows you to manage your WordPress site from the command line without using a web browser. I currently use WP-CLI to temporarily disable the WordPress Google Authenticator plugin, create and configure a version of this site to run in a local AMP environment on my Mac and periodically change the posts that appear in the slider on this site’s home page.
Checking if a File Exists in iCloud from the Command Line
While moving selected local files and folders to iCloud I came across a folder on my Mac containing a large number of documents some of which appeared to be duplicates of those on iCloud. Before deciding which ones to move, I wanted to check each one to see if it already existed on iCloud.
Using Terminal to Find Your Mac’s Network Name
Your Mac’s network name forms part of its network address. If you want to share your Mac’s files and folders with other computers on your network you’ll need to know its network address so that those other computers can connect to it. This information is readily available in System Preferences
, but this article looks at how to get your Mac’s network name using the command line.
Add a Recent or Favorites Folder to Your Dock Using the macOS Terminal
Type the query add recents dock terminal into any Internet search engine and most – if not all – relevant entries on the first results page will give the following code or a slight variation of it:
defaults write com.apple.dock persistent-others -array-add '{"tile-data" = {"list-type" = 1;}; "tile-type" = "recents-tile";}'; killall Dock
Most of these articles are from 2015 or earlier and the Mac OS has changed a lot since, but the code still appears to do exactly as advertised.
Python Conditional (if) Statement Throwing Error in Command Mode One-Liner
I had a situation where I needed to pass code to Python in the form of a single command instead of a script file. While this is easily done by invoking Python in command mode, the code contained a conditional statement that caused Python to throw an error.
Syncing OS X Address Books and iCal Calendars across Multiple Macs using Dropbox
Entering File and Folder Paths on the macOS Command Line
The one thing that trips me up time and again when using the command line in Terminal or other terminal emulator is being able to navigate the directory structure and target files or folders. After struggling getting the correct file or folder path I’m usually greeted with No such file or directory reminding me that the command line doesn’t like spaces in file and folder paths.
With that in mind here are a few ways to enter file and folder paths on the command line.
Recent Comments