mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-24 03:56:28 +08:00
parent
27eb7509a1
commit
f4789f0aa4
1 changed files with 2 additions and 2 deletions
|
@ -442,13 +442,13 @@ These are items relevant *only* on MacOS.
|
|||
|
||||
- Package management with `brew` (Homebrew) and/or `port` (MacPorts). These can be used to install on MacOS many of the above commands.
|
||||
|
||||
- Copy output of any command with `pbcopy` and paste input with `pbpaste`.
|
||||
- Copy output of any command to a desktop app with `pbcopy` and paste input from one with `pbpaste`.
|
||||
|
||||
- To open a file with a desktop app, use `open` or `open -a /Applications/Whatever.app`.
|
||||
|
||||
- Spotlight: Search files with `mdfind` and list metadata (such as photo EXIF info) with `mdls`.
|
||||
|
||||
- Be aware MacOS is based on BSD Unix, and many commands (for example `ps`, `ls`, `tail`, `awk`, `sed`) have many subtle variations from Linux, which is largely influenced by System V-style Unix and GNU tools. You can often tell the difference by noting a man page has the heading "BSD General Commands Manual." In some cases GNU versions can be installed, too (such as `gawk` and `gsed` for GNU awk and sed).
|
||||
- Be aware MacOS is based on BSD Unix, and many commands (for example `ps`, `ls`, `tail`, `awk`, `sed`) have many subtle variations from Linux, which is largely influenced by System V-style Unix and GNU tools. You can often tell the difference by noting a man page has the heading "BSD General Commands Manual." In some cases GNU versions can be installed, too (such as `gawk` and `gsed` for GNU awk and sed). If writing cross-platform Bash scripts, avoid such commands (for example, consider Python or `perl`) or test carefully.
|
||||
|
||||
|
||||
## More resources
|
||||
|
|
Loading…
Reference in a new issue