---
# System prepended metadata

title: Cheatsheet
tags: [engineering, shell]

---

# Cheatsheet

###### tags: `engineering`, `shell`

## :memo: Linux

### 1. disk space
```shell=1
df -h
sudo du -xh --max-depth=1 . | sort -rh | head -n 11 - | sed 1d
```

### 2. vim
```shell=1
:%s/^,//ng
```
It will get the lines count which start with `,`, like `3 matches on 3 lines`.

```shell=1
:g/keyword/d
```
It will delete all lines contains `keyword`.

```shell=1
:set list
```
Show the `^` and `$` for each line.

```shell=1
:g/^s*$/d
```
Delete empty lines.


---
[ToC]

:::info
:pushpin: [HackMD Tutorials](https://hackmd.io/c/tutorials) 
:::

- `LaTeX` for formulas

$$
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
$$

- Embed YouTube Videos

{%youtube PJuNmlE74BQ %}


