-
Notifications
You must be signed in to change notification settings - Fork 9
/
appendix.sh
98 lines (69 loc) · 1.75 KB
/
appendix.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
####################
## 1. Terminal Software
####################
# Windows: TetaTeam, PuTTY, Poderosa
# Linux, FreeBSD: xterm, kterm, gnome-terminal, Konsole
# Mac: Terminal.app, iTerm2
# ref: ex4) stty command
# tty command: current virtual terminal device
# generally tty is physical display and keyboard | pts is virtual terminal
# example)
# suppose there are ttys000 and ttys001
# echo "Hello" > /dev/ttys001
####################
## 2. Linux Command Option
####################
# ref: ex1) getopts command
####################
## 3. Virable Name
####################
# Usually use Snake_Case than CamelCase
####################
## 4. Cron Script
####################
# Linux: crond
# FreeBSD: cron
# path: /etc/crontab
# =>
# The periodic and atrun jobs have moved to launchd jobs
# See /System/Library/LaunchDaemons
#
# minute hour mday month wday who command
# edit mode: $ crontab -e
# ex)
# 0 1 * * * /usr/bin/command
# list: $ crontab -l
# remove: # crontab -r
# crontab path by user
# Linux: /var/spool/cron/USERNAME
# FreeBSD: /var/cron/tabs/USERNAME
# cron manual
# $ man 1 crontab: command for user management
# $ man 5 crontab: crontab definition
# man cron: describe cron daemon
# In Mac
# Use launchd.plist than cron
# $ man launchd
# $ man launchd.plist
####################
## 5/6. pv/dialog command
####################
####################
## 7. set command
####################
# ref: ex21) -u option ex94) -e option
set -- "-all" "Daegu" "Choi" "Kim"
echo $2
####################
## 8. Web Service Monitoring
####################
# ref
# ping: ex114)
# process: ex111)
# log: grep
# port: nc ex61
# http header: curl ex110
# static file/application: curl ex115)
# backend server: ex116,117)
# Software
# Zabbix, Nagios, Munin-monitoring