You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -39,7 +39,7 @@ but it has since moved to GitHub, where people more talented than the original a
39
39
Scope:
40
40
41
41
- This guide is both for beginners and the experienced. The goals are *breadth* (everything important), *specificity* (give concrete examples of the most common case), and *brevity* (avoid things that aren't essential or digressions you can easily look up elsewhere). Every tip is essential in some situation or significantly saves time over alternatives.
42
-
- This is written for Linux, with the exception of the "[OS X only](#os-x-only)" and "[Windows only](#windows-only)" sections. Many of the other items apply or can be installed on other Unices or OS X (or even Cygwin).
42
+
- This is written for Linux, with the exception of the "[macOS only](#macos-only)" and "[Windows only](#windows-only)" sections. Many of the other items apply or can be installed on other Unices or macOS (or even Cygwin).
43
43
- The focus is on interactive Bash, though many tips apply to other shells and to general Bash scripting.
44
44
- It includes both "standard" Unix commands as well as ones that require special package installs -- so long as they are important enough to merit inclusion.
45
45
@@ -109,7 +109,7 @@ Notes:
109
109
110
110
- Use `nohup` or `disown` if you want a background process to keep running forever.
111
111
112
-
- Check what processes are listening via `netstat -lntp` or `ss -plat` (for TCP; add `-u` for UDP) or `lsof -iTCP -sTCP:LISTEN -P -n` (which also works on OS X).
112
+
- Check what processes are listening via `netstat -lntp` or `ss -plat` (for TCP; add `-u` for UDP) or `lsof -iTCP -sTCP:LISTEN -P -n` (which also works on macOS).
113
113
114
114
- See also `lsof` and `fuser` for open sockets and files.
115
115
@@ -538,23 +538,23 @@ A few examples of piecing together commands:
538
538
-`fortune`, `ddate`, and `sl`: um, well, it depends on whether you consider steam locomotives and Zippy quotations "useful"
539
539
540
540
541
-
## OS X only
541
+
## macOS only
542
542
543
-
These are items relevant *only* on OS X.
543
+
These are items relevant *only* on macOS.
544
544
545
-
- Package management with `brew` (Homebrew) and/or `port` (MacPorts). These can be used to install on OS X many of the above commands.
545
+
- Package management with `brew` (Homebrew) and/or `port` (MacPorts). These can be used to install on macOS many of the above commands.
546
546
547
547
- Copy output of any command to a desktop app with `pbcopy` and paste input from one with `pbpaste`.
548
548
549
-
- To enable the Option key in OS X Terminal as an alt key (such as used in the commands above like **alt-b**, **alt-f**, etc.), open Preferences -> Profiles -> Keyboard and select "Use Option as Meta key".
549
+
- To enable the Option key in macOS Terminal as an alt key (such as used in the commands above like **alt-b**, **alt-f**, etc.), open Preferences -> Profiles -> Keyboard and select "Use Option as Meta key".
550
550
551
551
- To open a file with a desktop app, use `open` or `open -a /Applications/Whatever.app`.
552
552
553
553
- Spotlight: Search files with `mdfind` and list metadata (such as photo EXIF info) with `mdls`.
554
554
555
-
- Be aware OS X 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.
555
+
- 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.
556
556
557
-
- To get OS X release information, use `sw_vers`.
557
+
- To get macOS release information, use `sw_vers`.
558
558
559
559
## Windows only
560
560
@@ -595,7 +595,7 @@ These items are relevant *only* on Windows.
595
595
## More resources
596
596
597
597
-[awesome-shell](https://github.com/alebcay/awesome-shell): A curated list of shell tools and resources.
598
-
-[awesome-osx-command-line](https://github.com/herrbischoff/awesome-osx-command-line): A more in-depth guide for the OS X command line.
598
+
-[awesome-osx-command-line](https://github.com/herrbischoff/awesome-osx-command-line): A more in-depth guide for the macOS command line.
599
599
-[Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) for writing better shell scripts.
600
600
-[shellcheck](https://github.com/koalaman/shellcheck): A shell script static analysis tool. Essentially, lint for bash/sh/zsh.
601
601
-[Filenames and Pathnames in Shell](http://www.dwheeler.com/essays/filenames-in-shell.html): The sadly complex minutiae on how to handle filenames correctly in shell scripts.
0 commit comments