update to nextra 4

This commit is contained in:
2025-09-06 19:19:45 +02:00
parent d17a565130
commit 7864c38371
48 changed files with 998 additions and 500 deletions

View File

@@ -0,0 +1,7 @@
# Convert documents
```bash
find . -name "*.odt" | xargs -I % pandoc % -o %.md
```
You can add the `-p` flag to `xargs` to confirm before executing, useful for testing if what your are doing is actually correct.

View File

@@ -0,0 +1,7 @@
# Delete empty directories
```bash
find . -type d -empty -delete
```
This recursively finds and deletes empty directory.

7
content/cli/diff.md Executable file
View File

@@ -0,0 +1,7 @@
# See difference between files / directories
```bash
diff -ry dir1 dir2
```
The `-r` flag is to recurse into folders. The `-y` flag creates a side by side view, generally easier to read. `-q` Would only show what filenames changed.

View File

@@ -0,0 +1,23 @@
---
tags:
- cli
- macos
- format
---
# Format a Drive
## macOS
Some times Disk Utility cannot format a whole drive for some reason.
```
# Check devices
diskutil list
# To exfat
diskutil eraseDisk EXFAT "NAME" GPT /dev/diskN
# To fat32, with mbr
diskutil eraseDisk FAT32 "NAME" MBR /dev/diskN
```

15
content/cli/rename.md Executable file
View File

@@ -0,0 +1,15 @@
---
tags:
- rename
- regex
---
# `rename`
`rename` is a command to rename based on regex.
```bash
rename 's/.odt.md/.md/' *.odt.md
```
> Use the `-n` flag to dry run