forked from itamarg365/linuxjourney
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhelp-command.html
More file actions
174 lines (139 loc) · 6.26 KB
/
Copy pathhelp-command.html
File metadata and controls
174 lines (139 loc) · 6.26 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>help-command</title>
<script
src="../static/assets/category/application-8013fdc35e4c79f95bcb3d655ff61f137ac05bcee52e6d96588427a84eddef12.js.download"
data-turbolinks-track="true"></script>
<link rel="stylesheet" media="all"
href="../static/assets/category/application-b0b91461d093aa2ed95d8a7467856e4dc16f55744d3c17a927c3598e5b26cd3f.css"
data-turbolinks-track="true">
</head>
<body>
<div id="wrapper" class="active">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul id="sidebar_menu" class="sidebar-nav">
<li class="sidebar-brand"><a>Command Line</a>
</li>
</ul>
<ul class="sidebar-nav" id="sidebar">
<li>
<a class="" href="the-shell.html">
1. The shell</a>
</li>
<li>
<a class="" href="print-working-directory-pwd-command.html">
2. Print working directory pwd command</a>
</li>
<li>
<a class="" href="change-directory-cd-command.html">
3. Change directory cd command</a>
</li>
<li>
<a class="" href="list-directories-ls-command.html">
4. List directories ls command</a>
</li>
<li>
<a class="" href="touch-command.html">
5. Touch command</a>
</li>
<li>
<a class="" href="file-command.html">
6. File command</a>
</li>
<li>
<a class="" href="cat-command.html">
7. Cat command</a>
</li>
<li>
<a class="" href="less-command.html">
8. Less command</a>
</li>
<li>
<a class="" href="history-command.html">
9. History command</a>
</li>
<li>
<a class="" href="copy-cp-command.html">
10. Copy cp command</a>
</li>
<li>
<a class="" href="move-mv-command.html">
11. Move mv command</a>
</li>
<li>
<a class="" href="make-directory-mkdir-command.html">
12. Make directory mkdir command</a>
</li>
<li>
<a class="" href="remove-rm-command.html">
13. Remove rm command</a>
</li>
<li>
<a class="" href="find-command.html">
14. Find command</a>
</li>
<li>
<a class="current" href="help-command.html">
15. Help command</a>
</li>
<li>
<a class="" href="man-command.html">
16. Man command</a>
</li>
<li>
<a class="" href="whatis-command.html">
17. Whatis command</a>
</li>
<li>
<a class="" href="alias-command.html">
18. Alias command</a>
</li>
<li>
<a class="" href="exit-command.html">
19. Exit command</a>
</li>
</ul>
</div>
<!-- End of Sidebar -->
<div id="page-content-wrapper">
<!-- Keep all page content within the page-content inset div! -->
<div class="page-content inset">
<div class="row">
<div class="col-md-6 lesson">
<div class="user-app">
<a class="btn btn-default btn-sm" href="../index.html">
Home
</a>
</div>
<div class="lesson-content">
<h3>help</h3>
<p>Linux has some great built-in tools to help you how to use a command or check what flags are available for a command. One tool, help, is a built-in bash command that provides help for other bash commands (echo, logout, pwd, etc).</p>
<pre>$ help echo</pre>
<p>This will give you a description and the options you can use when you want to run echo. Note that help only works on built-ins, so <b>help ls</b> won’t work, because ls is a separate program rather than something built into the shell.</p>
<p>For other executable programs, it’s convention to have an option called --help or something similar. </p>
<pre>$ ls --help</pre>
<p>Don’t expect this to work on built-ins though. Since the shell handles them itself, <b>echo --help</b> won’t print any help, it will just echo the text --help back at you.</p>
<p>Not all developers who ship out executables will conform to this standard, but it’s probably your best shot to find some help on a program.</p>
</div>
</div>
<div class="col-md-6 practice">
<div class="exercise-content">
<h3>Exercise</h3>
<p>Run help on the echo command, logout command and pwd command.</p>
</div>
<div class="quiz-content">
<h3>Quiz Question</h3>
<p>How do you get quick command line help for built-in bash commands?</p>
<h3>Quiz Answer</h3>
<p>help</p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>