Skip to content

Commit 71e9619

Browse files
Add less command (#101)
1 parent af65f60 commit 71e9619

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

README.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,16 @@ Clears content on window.
9292
<td><a href="#k-head">head</a></td>
9393
</tr>
9494
<tr>
95-
<td><a href="#l-lpq">lpq</a></td>
96-
<td><a href="#m-lpr">lpr</a></td>
97-
<td><a href="#n-lprm">lprm</a></td>
98-
<td><a href="#o-ls">ls</a></td>
99-
<td><a href="#p-more">more</a></td>
100-
<td><a href="#q-mv">mv</a></td>
101-
<td><a href="#r-rm">rm</a></td>
102-
<td><a href="#s-tail">tail</a></td>
103-
<td><a href="#t-touch">touch</a></td>
95+
<td><a href="#l-less">less</a></td>
96+
<td><a href="#m-lpq">lpq</a></td>
97+
<td><a href="#n-lpr">lpr</a></td>
98+
<td><a href="#o-lprm">lprm</a></td>
99+
<td><a href="#p-ls">ls</a></td>
100+
<td><a href="#q-more">more</a></td>
101+
<td><a href="#r-mv">mv</a></td>
102+
<td><a href="#s-rm">rm</a></td>
103+
<td><a href="#t-tail">tail</a></td>
104+
<td><a href="#u-touch">touch</a></td>
104105
</tr>
105106
</table>
106107

@@ -187,7 +188,13 @@ Outputs the first 10 lines of file
187188
head filename
188189
```
189190

190-
### l. `lpq`
191+
### l. `less`
192+
Shows the contents of a file or a command output, one page at a time. It is similar to [more](#q-more), but has more advanced features and allows you to navigate both forward and backward through the file.
193+
```bash
194+
less filename
195+
```
196+
197+
### m. `lpq`
191198
Check out the printer queue.
192199
```bash
193200
lpq
@@ -200,19 +207,19 @@ active adnanad 59 demo 399360 bytes
200207
1st adnanad 60 (stdin) 0 bytes
201208
```
202209

203-
### m. `lpr`
210+
### n. `lpr`
204211
Print the file.
205212
```bash
206213
lpr filename
207214
```
208215

209-
### n. `lprm`
216+
### o. `lprm`
210217
Remove something from the printer queue.
211218
```bash
212219
lprm jobnumber
213220
```
214221

215-
### o. `ls`
222+
### p. `ls`
216223
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).
217224
```bash
218225
ls option
@@ -230,13 +237,13 @@ drwxr-xr-x 17 adnan staff 578 Mar 27 23:36 .git
230237
-rwxr-xr-x 1 adnan staff 2702 Mar 25 18:08 .gitignore
231238
</pre>
232239

233-
### p. `more`
240+
### q. `more`
234241
Shows the first part of a file (move with space and type q to quit).
235242
```bash
236243
more filename
237244
```
238245

239-
### q. `mv`
246+
### r. `mv`
240247
Moves a file from one location to other.
241248
```bash
242249
mv filename1 filename2
@@ -248,21 +255,21 @@ Also it can be used for rename a file.
248255
mv old_name new_name
249256
```
250257

251-
### r. `rm`
258+
### s. `rm`
252259
Removes a file. Using this command on a directory gives you an error.
253260
`rm: directory: is a directory`
254261
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.
255262
```bash
256263
rm filename
257264
```
258265

259-
### s. `tail`
266+
### t. `tail`
260267
Outputs the last 10 lines of file. Use `-f` to output appended data as the file grows.
261268
```bash
262269
tail filename
263270
```
264271

265-
### t. `touch`
272+
### u. `touch`
266273
Updates access and modification time stamps of your file. If it doesn't exists, it'll be created.
267274
```bash
268275
touch filename

0 commit comments

Comments
 (0)