Various macOS CLI commands
I will try to expand this list over time, but here are some useful macOS CLI.
ctrl-x ctrl-e
- Open the current command in your default editor (e.g. nano
or vim
), you can change the editor by setting the EDITOR
environment
variable. This is useful when you have a long command that you want to edit.
python -m http.server 4444
- Start a simple HTTP server in the current
directory on port 4444. This is useful for sharing files with other devices on
the same network.
mdfind -name "filename"
- Search for files on your system. This is a macOS
only command. It leverages the Spotlight index to quickly & easy find files
directly from the command line.
Links
I can really recommend you “The art of command line”, from where I got a lot of the stuff I shared here :) The art of command line