You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-38Lines changed: 37 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,22 +72,22 @@ Clears content on window.
72
72
<td><a href="#c-cp">cp</a></td>
73
73
<td><a href="#d-diff">diff</a></td>
74
74
<td><a href="#e-file">file</a></td>
75
-
<td><a href="#f-gunzip">gunzip</a></td>
76
-
<td><a href="#g-gzcat">gzcat</a></td>
77
-
<td><a href="#h-gzip">gzip</a></td>
78
-
<td><a href="#i-head">head</a></td>
79
-
<td><a href="#j-lpq">lpq</a></td>
75
+
<td><a href="#f-find">find</a></td>
76
+
<td><a href="#g-gunzip">gunzip</a></td>
77
+
<td><a href="#h-gzcat">gzcat</a></td>
78
+
<td><a href="#i-gzip">gzip</a></td>
79
+
<td><a href="#j-head">head</a></td>
80
80
</tr>
81
81
<tr>
82
-
<td><a href="#k-lpr">lpr</a></td>
83
-
<td><a href="#l-lprm">lprm</a></td>
84
-
<td><a href="#m-ls">ls</a></td>
85
-
<td><a href="#n-more">more</a></td>
86
-
<td><a href="#o-mv">mv</a></td>
87
-
<td><a href="#p-rm">rm</a></td>
88
-
<td><a href="#q-tail">tail</a></td>
89
-
<td><a href="#r-touch">touch</a></td>
90
-
<td><a href="#s-find">find</a></td>
82
+
<td><a href="#k-lpq">lpq</a></td>
83
+
<td><a href="#l-lpr">lpr</a></td>
84
+
<td><a href="#m-lprm">lprm</a></td>
85
+
<td><a href="#n-ls">ls</a></td>
86
+
<td><a href="#o-more">more</a></td>
87
+
<td><a href="#p-mv">mv</a></td>
88
+
<td><a href="#q-rm">rm</a></td>
89
+
<td><a href="#r-tail">tail</a></td>
90
+
<td><a href="#s-touch">touch</a></td>
91
91
</tr>
92
92
</table>
93
93
@@ -132,32 +132,42 @@ Example:
132
132
$ file index.html
133
133
index.html: HTML document, ASCII text
134
134
```
135
+
### f. `find`
136
+
Find files in directory
137
+
```bash
138
+
find directory options pattern
139
+
```
140
+
Example:
141
+
```bash
142
+
$ find . -name README.md
143
+
$ find /home/user1 -name '*.png'
144
+
```
135
145
136
-
### f. `gunzip`
146
+
### g. `gunzip`
137
147
Un-compresses files compressed by gzip.
138
148
```bash
139
149
gunzip filename
140
150
```
141
151
142
-
### g. `gzcat`
152
+
### h. `gzcat`
143
153
Lets you look at gzipped file without actually having to gunzip it.
144
154
```bash
145
155
gzcat filename
146
156
```
147
157
148
-
### h. `gzip`
158
+
### i. `gzip`
149
159
Compresses files.
150
160
```bash
151
161
gzip filename
152
162
```
153
163
154
-
### i. `head`
164
+
### j. `head`
155
165
Outputs the first 10 lines of file
156
166
```bash
157
167
head filename
158
168
```
159
169
160
-
### j. `lpq`
170
+
### k. `lpq`
161
171
Check out the printer queue.
162
172
```bash
163
173
lpq
@@ -170,19 +180,19 @@ active adnanad 59 demo 399360 bytes
170
180
1st adnanad 60 (stdin) 0 bytes
171
181
```
172
182
173
-
### k. `lpr`
183
+
### l. `lpr`
174
184
Print the file.
175
185
```bash
176
186
lpr filename
177
187
```
178
188
179
-
### l. `lprm`
189
+
### m. `lprm`
180
190
Remove something from the printer queue.
181
191
```bash
182
192
lprm jobnumber
183
193
```
184
194
185
-
### m. `ls`
195
+
### n. `ls`
186
196
Lists your files. `ls` has many options: `-l` lists files in 'long format', which contains the exact size of the file, who owns the file, who has the right to look at it, and when it was last modified. `-a` lists all files, including hidden files. For more information on this command check this [link](https://ss64.com/bash/ls.html).
-rwxr-xr-x 1 adnan staff 2702 Mar 25 18:08 .gitignore
201
211
</pre>
202
212
203
-
### n. `more`
213
+
### o. `more`
204
214
Shows the first part of a file (move with space and type q to quit).
205
215
```bash
206
216
more filename
207
217
```
208
218
209
-
### o. `mv`
219
+
### p. `mv`
210
220
Moves a file from one location to other.
211
221
```bash
212
222
mv filename1 filename2
213
223
```
214
224
Where `filename1` is the source path to the file and `filename2` is the destination path to the file.
215
225
216
-
### p. `rm`
226
+
### q. `rm`
217
227
Removes a file. Using this command on a directory gives you an error.
218
228
`rm: directory: is a directory`
219
229
To remove a directory you have to pass `-r` which will remove the content of the directory recursively. Optionally you can use `-f` flag to force the deletion i.e. without any confirmations etc.
220
230
```bash
221
231
rm filename
222
232
```
223
233
224
-
### q. `tail`
234
+
### r. `tail`
225
235
Outputs the last 10 lines of file. Use `-f` to output appended data as the file grows.
0 commit comments