↝ OWC / MacSales.com... ↜
↝ diglloyd Deal Finder... ↜
Buy other stuff at Amazon.com...
Must-have expansion for iMac/MacBook Pro/Mac mini
Thunderbolt 3 • USB 3 • USB-C • Gigabit Ethernet • Dual Thunderbolt 3 Ports
4K Support • Mini Display Port • Analog sound in/out • Optical sound out
Works on any Mac with Thunderbolt 3
Basics of Command Line
The command line is a powerful tool which can shorten and simplify many tasks.
However, the command line requires some investment in learning. This page covers a few very basic ideas in using the command line.
- Lines preceeded with '#' are explanatory comments.
- The prefix “diglloyd:MPG lloyd$ ” is a prompt emitted by the command line; do not type this; your system will have something of the same form reflecting your own system names.
- Commands to type are shown in bold.
Very quick general tips for the command line
- Spaces matter; they are used as separators on the command line. Hence “Macintosh HD” is a nuisance name for a volume, as is any file name with spaces (enclose in straight quotes ""). Hence I name my boot volume “Boot”, which is also shorter and easier to type.
- Directory paths are separated by a forward slash "/".
- Case sensitive: Boot ≠ boot ≠ BOOT.
- The tab key will auto-complete filenames.
- There are a variety of special characters to be aware of, but the main useful one is the "*" character which can be used to wild card file names instead of typing them out (e.g. “ls *.jpg” to list all .jpg files).
Very brief examples of commands
The very, very basics.
# change to home directory diglloyd:MPG lloyd$ cd # change to top level of the volume 'Master' diglloyd:MPG lloyd$ cd /Volumes/Master # change to top level of boot volume diglloyd:MPG lloyd$ cd / # change to Applications folder on boot volume diglloyd:MPG lloyd$ cd /Applications
# list files in current directory diglloyd:MPG lloyd$ ls # list files in current directory, recursively diglloyd:MPG lloyd$ ls -lR # list files in directory Photos on volume Master diglloyd:MPG lloyd$ ls /Volumes/Master/Photos # list all .jpg and .JPG files in current directory (wild card) diglloyd:MPG lloyd$ ls *.jpg *.JPG
Run a command in the current directory
# run the command verifyVolumes.sh, found in the current directory diglloyd:MPG lloyd$ ./VerifyVolumes.sh
$199 SAVE $100 = 33.0% Electro-Voice R300-HD Handheld Wireless Microphone System (Band… in All Other Categories
$10 SAVE $10 = 50.0% ExpoImaging Rogue Safari DSLR Pop-Up Flash Booster in All Other Categories
$160 SAVE $115 = 41.0% Porta Brace Soft Case for Assembled Cine-Style Camera in All Other Categories
$230 SAVE $370 = 61.0% ezviz BN-1424A1 4-Channel 1080p NVR with 1TB HDD and 4 1080p Out… in All Other Categories
$280 SAVE $420 = 60.0% ezviz BN-1824A2 8-Channel 1080p NVR with 2TB HDD and 4 1080p Out… in All Other Categories
$450 SAVE $550 = 55.0% ezviz BN-1G28A3 16-Channel 1080p NVR with 3TB HDD and 8 1080p Ou… in All Other Categories