File tree Expand file tree Collapse file tree 22 files changed +252
-12
lines changed Expand file tree Collapse file tree 22 files changed +252
-12
lines changed Original file line number Diff line number Diff line change 13
13
- Search for a process that matches a string:
14
14
15
15
`ps aux | grep {{string}}`
16
+
17
+ - List all processes of the current user in extra full format:
18
+
19
+ `ps --user $(id -u) -F`
20
+
21
+ - List all processes of the current user as a tree:
22
+
23
+ `ps --user $(id -u) f`
Original file line number Diff line number Diff line change 21
21
- Use a specific character as a delimiter instead of a new line:
22
22
23
23
`read -d {{new_delimiter}} {{variable}}`
24
+
25
+ - Do not let backslash (\) act as an escape character:
26
+
27
+ `read -r {{variable}}`
Original file line number Diff line number Diff line change
1
+ # smartctl
2
+
3
+ > View a disk's SMART data and other information.
4
+ > See https://en.wikipedia.org/wiki/S.M.A.R.T for more information.
5
+
6
+ - View SMART health summary:
7
+
8
+ `sudo smartctl --health {{/dev/sda}}`
9
+
10
+ - View device information:
11
+
12
+ `sudo smartctl --info {{/dev/sda}}`
13
+
14
+ - Begin a short self-test:
15
+
16
+ `sudo smartctl --test short {{/dev/sda}}`
17
+
18
+ - View current/last self-test status and other SMART capabilities:
19
+
20
+ `sudo smartctl --capabilities {{/dev/sda}}`
21
+
22
+ - View SMART self-test log (if supported):
23
+
24
+ `sudo smartctl --log selftest {{/dev/sda}}`
Original file line number Diff line number Diff line change 13
13
- Search for a process that matches a string:
14
14
15
15
`ps aux | grep {{string}}`
16
+
17
+ - List all processes of the current user in extra full format:
18
+
19
+ `ps --user $(id -u) -F`
20
+
21
+ - List all processes of the current user as a tree:
22
+
23
+ `ps --user $(id -u) f`
Original file line number Diff line number Diff line change 21
21
- Use a specific character as a delimiter instead of a new line:
22
22
23
23
`read -d {{new_delimiter}} {{variable}}`
24
+
25
+ - Do not let backslash (\) act as an escape character:
26
+
27
+ `read -r {{variable}}`
Original file line number Diff line number Diff line change
1
+ # smartctl
2
+
3
+ > View a disk's SMART data and other information.
4
+ > See https://en.wikipedia.org/wiki/S.M.A.R.T for more information.
5
+
6
+ - View SMART health summary:
7
+
8
+ `sudo smartctl --health {{/dev/sda}}`
9
+
10
+ - View device information:
11
+
12
+ `sudo smartctl --info {{/dev/sda}}`
13
+
14
+ - Begin a short self-test:
15
+
16
+ `sudo smartctl --test short {{/dev/sda}}`
17
+
18
+ - View current/last self-test status and other SMART capabilities:
19
+
20
+ `sudo smartctl --capabilities {{/dev/sda}}`
21
+
22
+ - View SMART self-test log (if supported):
23
+
24
+ `sudo smartctl --log selftest {{/dev/sda}}`
Original file line number Diff line number Diff line change
1
+ # zenity
2
+
3
+ > Display dialogs from the command line/shell scripts.
4
+ > Return user-inserted values or 1 if error.
5
+
6
+ - Display the default question dialog:
7
+
8
+ `zenity --question`
9
+
10
+ - Display an info dialog displaying the text "Hello!":
11
+
12
+ `zenity --info --text="{{Hello!}}"`
13
+
14
+ - Display a name/password form and output the data separated by ";":
15
+
16
+ `zenity --forms --add-entry="{{Name}}" --add-password="{{Password}}" --separator="{{;}}"`
17
+
18
+ - Display a file selection form in which the user can only select directories:
19
+
20
+ `zenity --file-selection --directory`
21
+
22
+ - Display a progress bar which updates its message every second and show a progress percent:
23
+
24
+ `{{(echo "#1"; sleep 1; echo "50"; echo "#2"; sleep 1; echo "100")}} | zenity --progress`
Original file line number Diff line number Diff line change
1
+ # apachectl
2
+
3
+ > Apache HTTP Server control interface for macOS.
4
+
5
+ - Start the org.apache.httpd launchd job:
6
+
7
+ `apachectl start`
8
+
9
+ - Stop the launchd job:
10
+
11
+ `apachectl stop`
12
+
13
+ - Stop, then start launchd job:
14
+
15
+ `apachectl restart`
Original file line number Diff line number Diff line change 13
13
- Search for a process that matches a string:
14
14
15
15
`ps aux | grep {{string}}`
16
+
17
+ - List all processes of the current user in extra full format:
18
+
19
+ `ps --user $(id -u) -F`
20
+
21
+ - List all processes of the current user as a tree:
22
+
23
+ `ps --user $(id -u) f`
Original file line number Diff line number Diff line change 21
21
- Use a specific character as a delimiter instead of a new line:
22
22
23
23
`read -d {{new_delimiter}} {{variable}}`
24
+
25
+ - Do not let backslash (\) act as an escape character:
26
+
27
+ `read -r {{variable}}`
You can’t perform that action at this time.
0 commit comments