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.
Before selling my late 2015 27″ iMac Retina 5K I wanted to secure erase its 1TB Fusion Drive consisting of a 24GB SSD and 1TB HDD. Secure erasing an HDD is simple enough using the Security Options in
Disk Utility, but for Fusion Drives and SSDs this option is not available. To secure erase the iMac’s HDD I first needed to break the Fusion Drive into its constituent parts using
Having recently changed my local testing server environment from XAMPP to MAMP v2.0.5 I wanted to change the password for the MySQL root user. By default it’s set to root.
Changing the MySQL password for the root user was straightforward enough, but locating and editing the files to reflect the new password was a different story. Failure to update all the necessary files results in MAMP reporting the following error:
/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
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.