-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
195 lines (187 loc) · 3.88 KB
/
index.html
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta charset="utf-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
</style>
</head>
<body>
<textarea id="source">
class: center, middle
# Command Line 101
---
## What is the Command Line?
- Command Line Structure
- Prompt
- Commands
- Options
- Arguments
- Output
- Shell
- Bash
- Help
- `man`
---
## Getting Around
- `pwd`
- `ls`
- `ls [options] [location]`
- `ls -l /folder`
- `ls -a`
- Absolute and Relative Paths
- Slash vs No Slash
- Path Shortcuts
- `~`
- Home
- `.`
- Current Directory
- `..`
- Parent Directory
- Moving
- `cd`
- No path = go home
- Tab completion
- `ctrl-c`
---
## Files
- Case Sensitive
- Spaces in File Names
- Quotes
- Single or Double
- Escape character
- `\`
- Tab completion is your friend
- Hidden Files
- `ls -a`
- File Directories
- `mkdir [options] <Directory>`
- `mkdir -p`
- Makes parent directories as needed
- `mkdir -v`
- Verbose output
- `rmdir`
- Directories must be empty
- Files
- `touch`
- Creates a blank file
- `cp [options] <source path> <destination path>`
- Copy a file or directory
- `cp -r`
- Recursive for directories
- `mv [options] <source> <destination>`
- Move a file or directory
- Also renames a file or directory
- `rm [options] <file>`
- Remove a file or empty folder
- NO UNDO!!!!
- `rm -r`
- Remove non-empty folders recursively
- Editing Files
- `nano`
- `ctrl o`
- `ctrl x`
- `vi`
## Wildcards
- `*`
- Zero or more characters
- `ls *.txt`
- `?`
- Single character
- `ls ?o*`
- `ls *.???`
- `[]`
- Range of Characters
- `ls [sv]*` (Name begins with 's' or 'v')
---
## Permissions
- Verbs
- `r`
- read
- `w`
- write
- `x`
- execute
- Nouns
- `u`
- Owner (Single user)
- `g`
- Group
- `o`
- Other (everyone else)
---
## Permissions
- Viewing Permissions
- `ls -l`
- First character identifies file type
- Next three = owner
- Next three = group
- Next three = other
---
## Permissions
- Changing Permissions
- `chmod [permissions][path]`
- Permissions argument
- 1 Whose permissions are changing?
- 2 Are we adding or removing permissions?
- 3 What permissions are being set?
---
## Permissions
- Octal permissions
| Octal | Binary |
|-------|--------|
| `0` | `000` |
| `1` | `001` |
| `2` | `010` |
| `3` | `011` |
| `4` | `100` |
| `5` | `101` |
| `6` | `110` |
| `7` | `111` |
`rwx`
`111`
---
## Permissions
- Directories work the same
- Root user
---
## Piping and Redirection
- Three data streams
- STDIN (0)
- STDOUT (1)
- STDERR (2)
- Redirecting
- `>`
- `ls > output.txt`
- Creates a new file, or wipes and recreates existing file
- `>>`
- Creates a new file, or appends to existing file
---
## Process Management
- `top`
- `htop`
- `ps awk`
---
## Scripting
---
## Networking
- `ping`
- `traceroute`
- `ssh`
</textarea>
<script src="https://remarkjs.com/downloads/remark-latest.min.js">
</script>
<script>
var slideshow = remark.create();
</script>
</body>
</html>