Mac OS Terminal Cheat Sheet
Terminal HotKeys
Option+↑ | Option+Arrow Key will go through command items. |
↑ | Arrow up will select the previous command (and then down will take you back) |
Option+← | Will go to the next word in your current command (and arrow forward will go...forward!) |
Control+U | Erases everything from cursor back to the beginning of the line |
Control+K | Erases everything from the cursor forward |
Randos
Select directory
cd
Check reboot / restart history
last reboot
Check uptime
uptime
Changing the File Date
This is a sneaky way to manually change the file creation date of a file to make something appear that it comes from the past or the future. Good for faking render dates / times. I do not advise this but it is a thing you can do.
“I’ve never done this because that would be unethical” - Cam Vokey, attorney at law
touch -mt 202109160951
replace date with desired date time YYYYMMDDHHMM and then drag in your files to the terminal window.
Setting Up A System Scheduler
It used to be you could do this in System Settings, but now it has to be done in terminal
You can only have ONE event. You can't schedule multiple events.
Get current schedule
pmset -g sched
Reset active schedule
sudo pmset repeat cancel
Set Restart every day at 4am
sudo pmset repeat restart MTWRFSU 04:00:00
Multiple Calculators
Up until 2018ish, Mac OS had something called a “dashboard” which was a system-wide hotkey that would overlay above all the apps. Within that dashboard were “widgets” - this was a good place to have things like timecode calculators, multiple regular calculators, unit conversion. Alas, it was removed from Apple’s development and for those who got used to having “as many damn calculators as I want”, it was a major loss.
To fix this major gap in lifestyle, I consulted the internet, and the solve was to create a .command file (this is a terminal executable file), that launches a second calculator (or third, or fourth). I call this “morecalc” - and I use the hotkey for spotlight-search to launch it. I press command+spacebar, type “morecalc”, and it will launch another calculator.
How to do this yourself:
- Open up text edit
- Make it plain text (command-shift-T is a good to know hotkey)
- Copy and paste this text:
open -na Calculator - Save it as “morecalc” or whatever unique file name that will easily come up in spotlight.
- Quit text edit
- In finder rename this saved file to “yourname.command”
- Now you have however many calculators you want, any damn time you want them.