tree to markdown command
This commit is contained in:
parent
38bcdd15cc
commit
f666ac3dc9
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "tree"
|
title: "tree"
|
||||||
tags: [ "basics" ]
|
tags: [ "basics", "tree", "markdown" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
The `tree` utility outputs a full listing of everything in your current directory, and those below.
|
The `tree` utility outputs a full listing of everything in your current directory, and those below.
|
||||||
@ -23,3 +23,14 @@ README.md
|
|||||||
```
|
```
|
||||||
|
|
||||||
Each description-line starts with a tab.
|
Each description-line starts with a tab.
|
||||||
|
|
||||||
|
## Markdown Conversion
|
||||||
|
|
||||||
|
To represent a file structure as a nested series of markdown lists, you can try this horrifying `sed` one-liner:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
tree -tf --dirsfirst --gitignore --noreport --charset ascii | \
|
||||||
|
sed -e 's/| \+/ /g' \
|
||||||
|
-e 's/[|`]-\+/ */g' \
|
||||||
|
-e 's:\(* \)\(\(.*/\)\([^/]\+\)\):\1[\4](\2):g'
|
||||||
|
```
|
||||||
|
21
data/sqlite.md
Normal file
21
data/sqlite.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
title: "sqlite"
|
||||||
|
tags: [ "Documentation", "data" ]
|
||||||
|
---
|
||||||
|
|
||||||
|
Work with a database:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sqlite3 "$FILE".sqlite3
|
||||||
|
```
|
||||||
|
Compress the database:
|
||||||
|
|
||||||
|
```sqlite
|
||||||
|
pragma vacuum;
|
||||||
|
```
|
||||||
|
Optimize the database:
|
||||||
|
|
||||||
|
```sqlite
|
||||||
|
pragma optimize;
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user