-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrandom.html
41 lines (39 loc) · 2.59 KB
/
random.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
<!DOCTYPE html>
<html>
<head>
<title>Random Useful Commands</title>
</head>
<body>
<p style="text-align: center;"><strong><span style="font-size: 24px; color: rgb(184, 49, 47);">Random Useful Commands</span></strong></p>
<p style="text-align: left;"><strong><span style="font-size: 24px; color: rgb(0, 0, 0);">Whats here:</span></strong></p>
<ul>
<li style="text-align: left;"><span style="font-size: 24px;">Grep (-irl)</span></li>
<li style="text-align: left;"><span style="font-size: 24px;">Cat (find particular line)</span></li>
<li style="text-align: left;"><span style="font-size: 24px;">Install downloaded packages (direct website download)</span></li>
</ul>
<p style="text-align: left;"><span style="font-size: 24px;"><br></span></p>
<p style="text-align: left;"><span style="font-size: 24px; color: rgb(97, 189, 109);">Grep</span></p>
<ul>
<li style="text-align: left;"><span style="font-size: 24px;"><strong>grep -irl <string> - can look in directories/files etc</strong></span></li>
</ul>
<p><span style="font-size: 24px; color: rgb(147, 101, 184);">Useful cat command to find particular line in a file:</span></p>
<ul>
<li><span style="font-size: 24px;"><strong>cat -n <file name> </strong></span></li>
<li><span style="font-size: 24px;"><strong>cat <filename> | sed ' <linenumber>!d '</strong></span></li>
</ul>
<p><span style="font-size: 24px; color: rgb(41, 105, 176);">Installing downloaded packages (straight from website):</span></p>
<ul>
<li><span style="font-size: 24px;"><strong>apt-get install -f ./<pkg name></strong></span></li>
</ul>
<p><span style="color: rgb(65, 168, 95); font-size: 24px;">Grep Flags:</span></p>
<p><span style="font-size: 24px;"><strong>grep -w - </strong>matches entire words. example: -w cat, will only find full word cat</span></p>
<p><span style="font-size: 24px;"><strong>grep -i</strong> allows case-insensitive matches -example, cat, CAT</span></p>
<p><span style="font-size: 24px;"><strong>grep -c -</strong> counts the number of lines that match, similar to wc -l</span></p>
<p><span style="font-size: 24px;"><strong>grep -v -</strong> inverts, returning lines that do not match the pattern</span></p>
<p><span style="font-size: 24px;"><strong><span style="font-size: 24px;">grep-a</span></strong></span></p>
<p><span style="font-size: 24px;"><strong>grep -o</strong> - returns only the matching words, not the entire line</span></p>
<p><br></p>
<p><br></p>
<p><br></p>
</body>
</html>