-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
394 lines (384 loc) · 18.6 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TryBash - Learn Bash the Easy Way</title>
<meta name="description" content="Command Line Tutorial">
<meta name="author" content="TryBash Team">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/print.css" media="print">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicons/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="img/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="img/favicons/favicon-96x96.png">
</head>
<body>
<div class="content">
<header>
<div class="container">
<div class="row">
<div class="col-xs-12 header">
<a href="/">
<img src="img/logo.svg" class="logo">
</a>
</div>
</div>
</div>
</header>
<div class="cover">
<div class="container">
<div class="row">
<h1 class="title">Learn Bash<br>the Easy Way</h1>
<div class="col-xs-12 Game">
<p>
Take our fun, interactive course and learn the basics of the UNIX Shell in just a few minutes. Jump in right away:
</p>
<a href="/game" class="Game-imageWrapper">
<span class="Game-button">
Get Started!
</span>
<img class="Game-image" src="img/terminal.jpg" alt="terminal"/>
</a>
</div>
</div>
</div>
</div>
<div class="cheatsheet">
<div class="container">
<div class="row">
<div class="cheatsheet-content col-xs-12">
<div class="row">
<h2>
<!-- Logo for print styles -->
<img src="img/logo-black.svg" class="logo-black">
Cheat Sheet
</h2>
<p class="cheatsheet-text">The shell is dark and full of terrors. Take this:</p>
</div>
<div class="row">
<h3 class="command-category">File Navigation</h3>
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command left">ls</p>
<p class="command-desc left">Lists the contents of a directory</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command right">ls -t</p>
<p class="command-desc right">Sorts entries by time</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command left">ls -a</p>
<p class="command-desc left">Lists all contents, even hidden</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command right">ls -1</p>
<p class="command-desc right">Forces single column output</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command left">ls -h</p>
<p class="command-desc left">Lists contents in human-friendly units</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command right">pwd</p>
<p class="command-desc right">Shows the current working directory with full path</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command left">ls -l</p>
<p class="command-desc left">Displays permissions, links, owners, etc.</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command right">cd</p>
<p class="command-desc right">Changes directory, <code>cd ..</code> changes to parent directory. Alternatively, can enter full path, e.g. <code>cd /home/user1/Documents/</code></p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command left">ls -m</p>
<p class="command-desc left">Displays content in single line, separated by comma</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command right">cd d + TAB key</p>
<p class="command-desc right">TAB will auto-fill IF there is a unambiguous match</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command left">ls -R</p>
<p class="command-desc left">Lists content recursively, e.g. including content from directory</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command right">cd /dir</p>
<p class="command-desc right">Regardless of current working dir, user will change to /dir</p>
</div>
</div>
</div>
</div>
<div class="row">
<h3 class="command-category">File Manipulation</h3>
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">mkdir dir1</p>
<p class="command-desc">Creates new directory</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">mv origFile newLoc</p>
<p class="command-desc">Moves file to new location</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">mkdir dir1 dir2</p>
<p class="command-desc">Creates directory, or several ones</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">mv doc1 doc2 new</p>
<p class="command-desc">Moves multiple files to new location</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cp origFile newDes</p>
<p class="command-desc">Copies file to new destination</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">mv -n doc1</p>
<p class="command-desc">Does not overwrite existing file</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cp doc1 doc2 new</p>
<p class="command-desc">Link mkdir, can copy many files at once to a destination</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">rm -R</p>
<p class="command-desc">Deletes a directory</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cp -i origFile new</p>
<p class="command-desc">interactive mode, ensures no overwrite</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">rm doc1</p>
<p class="command-desc">Deletes a file</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cp doc* dir</p>
<p class="command-desc">*wildcard copies all files that start with "doc" into dir</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">rmdir dirName</p>
<p class="command-desc">Deletes an empty directory</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cp file *.jpg new</p>
<p class="command-desc">Copies all jpg's that start with file into new</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">rm doc1 doc2</p>
<p class="command-desc">Deletes multiple files at once</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">sort</p>
<p class="command-desc">Sorts input</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">uniq</p>
<p class="command-desc">Filters out consecutive duplicated lines</p>
</div>
</div>
</div>
</div>
<div class="row">
<h3 class="command-category">Redirection & Pipelining</h3>
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cat file</p>
<p class="command-desc">Displays content of a file</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">ls | sort</p>
<p class="command-desc">Pipelining, first lists then sorts</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cat doc1 > doc2</p>
<p class="command-desc">Performs like a copy, using redirection operator</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">ls /home -a sort | uniq</p>
<p class="command-desc">All unique items in home dir</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">cat doc1 >> doc2 </p>
<p class="command-desc">Appends doc1 to end of doc2</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">wc file1</p>
<p class="command-desc">Word, line, and byte count of file1</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">ls -l /user/home > home.txt</p>
<p class="command-desc">Lists contents of home to home.txt</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">wc -l file1</p>
<p class="command-desc">Returns lines in file1</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">sort file1</p>
<p class="command-desc">Sorts the contents of file1 line-by-line</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">grep</p>
<p class="command-desc">Processes text line-by-line and prints any matching patterns</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">sort file1 > sorted</p>
<p class="command-desc">Sorted file1 content saved to sorted</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">ls dir1 | grep "zip"</p>
<p class="command-desc">Shows all zip files in our dir1 path</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">uniq file1</p>
<p class="command-desc">Filters out duplicate lines from file1</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">grep -c "Error" log.txt</p>
<p class="command-desc">returns number of "Error" in log.txt</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">grep -i Error log</p>
<p class="command-desc">case insensitive search for "Error" in log</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">ls -R /home | grep "txt" | less</p>
<p class="command-desc">Shows all text files in /home</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">ls -a /home | sort > homeDir.txt</p>
<p class="command-desc">Saves sorted list of /home into homeDir.txt</p>
</div>
</div>
</div>
</div>
<div class="row">
<h3 class="command-category">Utility</h3>
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">clear</p>
<p class="command-desc">Clears the console, same as ctl-L</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">echo $HOME</p>
<p class="command-desc">Displays contents of the home directory</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">history</p>
<p class="command-desc">Shows complete list of previously executed commands</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">head File1</p>
<p class="command-desc">Displays first ten lines of File1</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="command">man ls</p>
<p class="command-desc">Show the documentation for a command</p>
</div>
<div class="col-xs-12 col-md-6">
<p class="command">tail File1</p>
<p class="command-desc">Displays last 10 lines of File1</p>
</div>
</div>
</div>
</div>
<div class="row print">
<p>You can also print this list for later reference:</p>
<button onclick="window.print()" class="print-button">
Print Cheatsheet
</button>
</div>
</div>
</div>
</div>
</div>
<div class="about">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>About TryBash:</h2>
<p class="desc">
TryBash was initially created as a student project at the <a href="https://www.htw-berlin.de/">HTW Berlin</a> in the summer semester of 2016.
</p>
<p class="desc">
The idea was to create an interactive learning game that teaches some basics of modern Unix shells, like <code>bash</code>. During the semester we wrote <a href="https://github.com/trybash/content">content</a>, developed a JavaScript based <a href="https://github.com/trybash/bash-emulator">Bash Emulator</a>, and combined those parts into the <a href="https://github.com/trybash/game">game</a>.
</p>
<p class="desc">
All our code and everything we did is open source on <a href="https://github.com/trybash">GitHub</a>. If you want to contribute ideas, add a lesson, or just fix a really obvios tpyo, feel free to engage in any way.
</p>
</div>
</div><div class="row">
<div class="col-xs-12">
<p class="desc">
You are just searching for a command line emulator to try quickly out something in your browser?
</p>
<p class="desc">
That's exactly what you can do with our standalone <a href="https://trybash.github.io/bash-emulator">Bash Emulator</a>.
</p>
</div>
</div>
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-xs-12">
<!-- https://octicons.github.com/icon/mark-github/ -->
<a href="https://github.com/trybash"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" class="github-link"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>Github</a>
<a href="impressum.html">Impressum & Datenschutzerklärung</a>
</div>
</div>
</div>
</footer>
</div>
</body>
</html>