--- 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 ```