summary refs log tree commit diff
path: root/Cheat sheets/Commands.md
blob: a27bd8e8504ad088bb1a86b020f32c433a95cc2c (plain)
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
---
description: Handy commands i use on my Linux distro machines
created: 2024-01-01
---


## Convert markdown to HTML
e.g. to preview a markdown file
Reqires [python-markdown](https://python-markdown.github.io/install/)

```bash
python3 -m markdown README.md > /tmp/README.html
```

To load extensions like code blocks:
```bash
python3 -m markdown -x fenced_code -x codehilite -x tables README.md > /tmp/README.html
```

## List packages
Arch
```
pacman -Q
```

Debian
```bash
dpkg -l
```

## List package files
Arch
```bash
pacman -Ql cowsay
```

Debian
```bash
dpkg -L cowsay
```

## Check USB eject progress
The OS will lie, and tell you that it's done writing a file, while in reality it's not to flush this cache type:
```bash
sync
```

To monitor progress:
```bash
watch -n 0.5 grep 'Dirty' /proc/meminfo
```