Skip to content

Commit 772f86a

Browse files
committed
Add more icon mappings and style improvements
1 parent 2014e29 commit 772f86a

41 files changed

Lines changed: 775 additions & 468 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎assets/basics/backupimaging.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A good backup follows the **3-2-1 rule**: keep **3** copies of your data, on **2
1212
| **Push to cloud storage** | `[rclone](/man/rclone)` |
1313
| **Snapshot a live filesystem** | `[lvm](/man/lvm)`, `[btrfs](/man/btrfs)`, `[zfs](/man/zfs)` |
1414

15-
> A backup you have never restored is only a hope. Test your restores regularly.
15+
**Test your restores regularly** - a backup you have never restored is only a hope.
1616

1717
## File Backups with rsync
1818
`rsync` copies only the differences between source and destination, which makes repeat backups fast. The `-a` (archive) flag preserves permissions, timestamps, symlinks, and ownership.
@@ -35,7 +35,7 @@ A trailing slash on the source matters: `src/` copies the **contents** of src, w
3535
| **--exclude** | Skip matching paths |
3636
| **--progress** | Show per-file progress |
3737

38-
> Always do a `--dry-run` first when using `--delete`, so you can confirm nothing important will be wiped.
38+
**Always dry-run first:** when using `--delete`, do a `--dry-run` so you can confirm nothing important will be wiped.
3939

4040
## Backups over SSH
4141
When either side of an `rsync` is `user@host:path`, the transfer runs over SSH automatically, still copying only changes. Add `-z` to compress on slow links.
@@ -71,7 +71,7 @@ To restore, extract the full archive first, then each incremental in order.
7171
Stream an archive straight to a remote host without a temporary file.
7272
```[tar](/man/tar) czf - /data | [ssh](/man/ssh) user@host "cat > /backup/data.tar.gz"```
7373

74-
> See the **Compression & Archiving** basics page for the full set of `tar`, `gzip`, `xz`, and `zstd` options.
74+
See the **Compression & Archiving** basics page for the full set of `tar`, `gzip`, `xz`, and `zstd` options.
7575

7676
## Snapshot & Dedup Tools
7777
Dedicated backup programs add deduplication, encryption, compression, and retention policies on top of plain copies. They store each file's blocks once, so re-running a backup is cheap.
@@ -101,7 +101,7 @@ Test a restore by extracting a snapshot to a scratch directory, or mount the rep
101101
```[restic](/man/restic) -r /mnt/backup/repo restore latest --target /tmp/restore-test```
102102
```[borg](/man/borg) mount /mnt/backup/repo /mnt/restore```
103103

104-
> If the repository is encrypted, the backup is only as safe as the key and passphrase. Export the key and store it somewhere that is not inside the backup.
104+
**If the repository is encrypted, the backup is only as safe as the key and passphrase.** Export the key and store it somewhere that is not inside the backup.
105105

106106
## Databases & Live Data
107107
Copying a running database's files mid-write produces a corrupt backup. Dump to a consistent snapshot first, then back up the dump like any other file.
@@ -122,7 +122,7 @@ Save a partition to a compressed image file instead of another disk.
122122
Restore an image back onto a device.
123123
```[gunzip](/man/gunzip) -c sda1.img.gz | [dd](/man/dd) of=/dev/sda1 bs=4M status=progress```
124124

125-
> `dd` writes wherever you point it with no confirmation. A wrong `of=` value will destroy data instantly. Check the device name twice, then once more. Image only **unmounted** partitions, an image of a filesystem that is changing underneath you is inconsistent.
125+
**Careful:** `dd` writes wherever you point it with no confirmation. A wrong `of=` value will destroy data instantly. Check the device name twice, then once more. Image only **unmounted** partitions: an image of a filesystem that is changing underneath you is inconsistent.
126126

127127
| Option | Description |
128128
|-----|-------------|
@@ -156,7 +156,7 @@ When a drive is failing, use `ddrescue` instead of `dd`: it retries bad sectors,
156156
`clonezilla` wraps these tools into a guided disk-cloning environment for bare-metal backups.
157157
```[clonezilla](/man/clonezilla)```
158158

159-
> For repairing a system that no longer boots, recovering deleted files with `testdisk` and `photorec`, and reading SMART health, see the **System Recovery** basics page.
159+
For repairing a system that no longer boots, recovering deleted files with `testdisk` and `photorec`, and reading SMART health, see the **System Recovery** basics page.
160160

161161
## Filesystem-level Snapshots
162162
Modern filesystems and volume managers can snapshot a live system instantly, giving you a stable, consistent view to back up from.
@@ -181,7 +181,7 @@ Btrfs and ZFS snapshots are even cheaper, create them read-only (`-r`) so the ba
181181
```[snapper](/man/snapper) create --description "before upgrade"```
182182
```[timeshift](/man/timeshift) --create```
183183

184-
> Snapshots live on the same disk and are not a backup by themselves. Copy them somewhere else.
184+
**Snapshots live on the same disk and are not a backup by themselves.** Copy them somewhere else.
185185

186186
## Cloud & Remote Sync
187187
`rclone` syncs files to dozens of cloud providers (S3, Backblaze, Google Drive, and more) after a one-time `rclone config`.
@@ -193,7 +193,7 @@ Check what would change without transferring, verify a finished backup, or mount
193193
```[rclone](/man/rclone) check /data remote:backup/data```
194194
```[rclone](/man/rclone) mount remote:backup /mnt/remote```
195195

196-
> Like `rsync --delete`, `rclone sync` makes the destination match the source, including deletions. Use `copy` when you only want to add files.
196+
**Careful:** like `rsync --delete`, `rclone sync` makes the destination match the source, including deletions. Use `copy` when you only want to add files.
197197

198198
## Verify & Automate
199199
A backup is only good if it is intact. Record checksums when you make a backup, then verify them on restore.
@@ -204,4 +204,4 @@ Schedule backups so they actually happen. Edit your crontab and add a nightly jo
204204
```[crontab](/man/crontab) -e```
205205
```0 2 * * * [rsync](/man/rsync) -a --delete /data/ /mnt/backup/data/```
206206

207-
> Automate the backup, but verify restores by hand on a schedule. The only proven backup is one you have successfully restored.
207+
**Automate the backup, but verify restores by hand on a schedule.** The only proven backup is one you have successfully restored.

‎assets/basics/compressionarchiving.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ List the contents before extracting an archive from an untrusted source, and ext
3333
```[tar](/man/tar) tf archive.tar.gz```
3434
```[tar](/man/tar) xf archive.tar.gz path/inside/archive.txt```
3535

36-
> A well-behaved archive contains a single top-level directory. If **tar tf** shows loose files instead, extract into a fresh directory with **-C** to avoid littering your current one.
36+
A well-behaved archive contains a single top-level directory. If **tar tf** shows loose files instead, extract into a fresh directory with **-C** to avoid littering your current one.
3737

3838
## Choosing a Compressor
3939
All compressors trade speed against ratio. As a rule of thumb: **zstd** is the modern default, **gzip** is the universal lowest common denominator, **xz** squeezes hardest when time does not matter.
@@ -61,7 +61,7 @@ Each has a matching decompressor.
6161
```[unxz](/man/unxz) [file].xz```
6262
```[unzstd](/man/unzstd) [file].zst```
6363

64-
> These tools compress single files only. To compress a directory, **tar** it first or use **zip**.
64+
These tools compress single files only. To compress a directory, **tar** it first or use **zip**.
6565

6666
On multi-core machines, **xz -T0** and **zstd -T0** use all cores, and **pigz** is a parallel drop-in for gzip.
6767
```[xz](/man/xz) -T0 [file]```
@@ -90,7 +90,7 @@ Extract with **unzip**, into a specific directory with **-d**, or just inspect t
9090
```[unzip](/man/unzip) -l archive.zip```
9191
```[zipinfo](/man/zipinfo) archive.zip```
9292

93-
> Zip does not preserve full Unix ownership and permissions. For system backups, stick to **tar**.
93+
Zip does not preserve full Unix ownership and permissions. For system backups, stick to **tar**.
9494

9595
## 7-Zip Archives
9696
**7z** offers very high compression ratios and strong AES-256 encryption. **a** adds to an archive, **x** extracts with full paths, **l** lists.
@@ -99,7 +99,7 @@ Extract with **unzip**, into a specific directory with **-d**, or just inspect t
9999
```[7z](/man/7z) x archive.7z```
100100
```[7z](/man/7z) l archive.7z```
101101

102-
> Use **x** to extract, not **e**: the **e** command flattens all files into the current directory, discarding their paths.
102+
Use **x** to extract, not **e**: the **e** command flattens all files into the current directory, discarding their paths.
103103

104104
## Rar Archives
105105
Rar is a proprietary format; **unrar** extracts it.

‎assets/basics/emacstexteditor.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Emacs keybindings use a shorthand notation: **C-** means hold Ctrl, and **M-** m
1414
| **C-g** | Cancel current command or operation |
1515
| **C-/** | Undo last change (also **C-x u**) |
1616

17-
> Stuck in a command you did not mean to start? **C-g** cancels almost anything. The built-in interactive tutorial is at **C-h t**.
17+
Stuck in a command you did not mean to start? **C-g** cancels almost anything. The built-in interactive tutorial is at **C-h t**.
1818

1919
## Navigation
2020
Movement commands come in pairs: **C-** moves by small units, **M-** moves by larger units.
@@ -59,7 +59,7 @@ Mark a region with **C-SPC** to set the start point, then move the cursor to sel
5959
| **C-x C-+** | Increase text size |
6060
| **C-x C--** | Decrease text size |
6161

62-
> Killed text accumulates in the **kill ring**, not just a single clipboard. Press **C-y** then repeat **M-y** to step back through everything you killed recently.
62+
Killed text accumulates in the **kill ring**, not just a single clipboard. Press **C-y** then repeat **M-y** to step back through everything you killed recently.
6363

6464
## Search and Replace
6565
Emacs uses incremental search: results appear as you type. Press **C-s** again to jump to the next match, **Enter** to stop at the current one, or **C-g** to cancel and return to where you started.
@@ -70,7 +70,7 @@ Emacs uses incremental search: results appear as you type. Press **C-s** again t
7070
| **C-r** | Search backward (incremental) |
7171
| **M-%** | Search and replace (query mode) |
7272

73-
> In query replace, answer **y** to replace, **n** to skip, **!** to replace all remaining, **q** to stop.
73+
In query replace, answer **y** to replace, **n** to skip, **!** to replace all remaining, **q** to stop.
7474

7575
## Buffers and Windows
7676
Every open file lives in a **buffer**. Emacs can split the screen into multiple windows, each showing a buffer.

‎assets/basics/filesfolders.md‎

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,54 @@
11
# Files & Folders
22

33
## Navigating
4-
**pwd** shows where you are, **cd** moves you somewhere else.
4+
**pwd** prints the directory you're currently in.
55
```[pwd](/man/pwd)```
6+
7+
**cd** moves you to another directory: give it a path, or use a shortcut.
68
```[cd](/man/cd) [path]```
9+
10+
Go up one level, to the parent directory.
711
```[cd](/man/cd) ..```
12+
13+
Go to your home directory (plain **cd** does the same).
814
```[cd](/man/cd) ~```
9-
```[cd](/man/cd) -```
1015

11-
> **cd ..** goes to the parent directory, **cd ~** (or plain **cd**) to your home directory, and **cd -** back to wherever you were before.
16+
Jump back to the directory you were in before.
17+
```[cd](/man/cd) -```
1218

1319
## Listing Contents
1420
**ls** lists a directory. **-l** shows details, **-a** includes hidden files (names starting with a dot), **-h** prints human-readable sizes.
1521
```[ls](/man/ls)```
1622
```[ls](/man/ls) -lah```
23+
24+
Sort by modification time, newest first. Add **-r** to reverse any sort order.
1725
```[ls](/man/ls) -lt```
26+
27+
Show nested directories as a tree.
1828
```[tree](/man/tree)```
1929

2030
Modern replacements add colors, icons, and git status.
2131
```[eza](/man/eza) -la```
2232
```[lsd](/man/lsd) -la```
2333

24-
> **ls -lt** sorts by modification time, newest first. Add **-r** to reverse any sort order.
25-
2634
## Viewing Files
2735
**cat** prints a whole file, **less** lets you scroll and search through it (press **q** to quit, **/** to search). **bat** is a cat clone with syntax highlighting.
2836
```[cat](/man/cat) [fileName]```
2937
```[less](/man/less) [fileName]```
3038
```[bat](/man/bat) [fileName]```
3139

32-
Show only the beginning or end of a file. **tail -f** keeps following a file as it grows, ideal for logs.
40+
Show only the beginning or end of a file.
3341
```[head](/man/head) -n 20 [fileName]```
3442
```[tail](/man/tail) -n 20 [fileName]```
43+
44+
**-f** keeps following a file as it grows, ideal for logs.
3545
```[tail](/man/tail) -f [logFile]```
3646

37-
Inspect what a file is and how big it is.
47+
Identify what kind of file something is.
3848
```[file](/man/file) [fileName]```
39-
```[wc](/man/wc) [fileName]```
4049

41-
> **wc** prints lines, words, and bytes. Use **wc -l** for just the line count.
50+
Count lines, words, and bytes. Use **-l** for just the line count.
51+
```[wc](/man/wc) [fileName]```
4252

4353
## Creating
4454
**touch** creates an empty file (or updates the timestamp of an existing one). **mkdir -p** creates nested directories in one step and does not complain if they already exist.
@@ -48,36 +58,42 @@ Inspect what a file is and how big it is.
4858
```> [fileName]```
4959

5060
## Copying, Moving, Renaming
51-
**cp** copies, **mv** moves and renames (there is no separate rename command). Use **-r** to copy directories recursively.
61+
**cp** copies a file. Use **-r** to copy a directory and everything in it.
5262
```[cp](/man/cp) [fileName] [newFileName]```
5363
```[cp](/man/cp) -r [folder] [folderCopy]```
64+
65+
**mv** both moves and renames; there is no separate rename command.
5466
```[mv](/man/mv) [oldName] [newName]```
5567
```[mv](/man/mv) [fileName] [targetFolder]/```
5668

57-
> Both **cp** and **mv** overwrite existing targets without asking. Add **-i** to be prompted, or **-n** to never overwrite.
69+
**Careful:** both **cp** and **mv** overwrite existing targets without asking. Add **-i** to be prompted first, or **-n** to never overwrite.
5870

5971
## Deleting
60-
**rm** removes files, **-r** removes directories with everything in them. There is no undo.
72+
**rm** removes files. **-r** removes a directory and everything in it. **There is no undo** - deletion is permanent and immediate, so double-check first. Use **rm -ri** to confirm each deletion when unsure.
6173
```[rm](/man/rm) [fileName]```
6274
```[rm](/man/rm) -r [folderName]```
63-
```[rmdir](/man/rmdir) [emptyFolderName]```
6475

65-
> **rm** deletes permanently and immediately. For anything you are not sure about, use the trash instead, or at least run **rm -ri** to confirm each deletion.
76+
**rmdir** removes a directory only if it is already empty.
77+
```[rmdir](/man/rmdir) [emptyFolderName]```
6678

67-
Move files to the desktop trash instead of deleting them outright.
79+
Safer than **rm**: move files to the desktop trash, where they can be restored.
6880
```[gio](/man/gio) trash [file]```
6981
```[trash-put](/man/trash-put) [file]```
82+
83+
List or empty the trash.
7084
```[trash-list](/man/trash-list)```
7185
```[trash-empty](/man/trash-empty)```
7286
```[gio](/man/gio) trash --empty```
7387

7488
## Links
75-
A **symbolic link** is a pointer to a path; it breaks if the target moves. A **hard link** is a second name for the same file content and keeps working until all names are deleted.
89+
A **symbolic link** points to a path. It breaks if the target moves, but it's what you want in almost all cases.
7690
```[ln](/man/ln) -s [target] [linkName]```
91+
92+
A **hard link** is a second name for the same file content, working until all names are deleted. Hard links can't span filesystems or point at directories.
7793
```[ln](/man/ln) [target] [linkName]```
78-
```[readlink](/man/readlink) -f [linkName]```
7994

80-
> Symbolic links (**ln -s**) are what you want in almost all cases. Hard links cannot span filesystems or point at directories.
95+
Resolve a link to the real path it points at.
96+
```[readlink](/man/readlink) -f [linkName]```
8197

8298
## Permissions & Ownership
8399
Every file has an owner, a group, and permission bits for owner/group/others. **ls -l** shows them, **stat** shows everything.
@@ -108,7 +124,7 @@ Every file has an owner, a group, and permission bits for owner/group/others. **
108124
```[grep](/man/grep) -rn "phrase" [folder]```
109125
```[rg](/man/rg) "phrase"```
110126

111-
> To find files by name, size, or age, see the **Search & Find** basics page.
127+
To find files by name, size, or age instead, see the **Search & Find** basics page.
112128

113129
## Comparing Files
114130
**diff -u** shows differences in the familiar patch format.

‎assets/basics/git.md‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ Changes move in two steps: **add** puts them in the staging area, **commit** tur
1616
```[git](/man/git) add .```
1717
```[git](/man/git) commit -m "describe the change"```
1818

19-
Exchange commits with the remote repository.
19+
Stage interactively, hunk by hunk: ideal for committing only part of your changes.
20+
```[git](/man/git) add -p```
21+
22+
Exchange commits with the remote repository. **pull** is **fetch** (download) plus **merge** in one step.
2023
```[git](/man/git) push```
2124
```[git](/man/git) pull```
2225

23-
> **git add -p** stages interactively, hunk by hunk: ideal for committing only part of your changes. **git pull** is **fetch** (download) plus **merge** in one step.
24-
2526
## Branches
2627
Branches are cheap pointers to commits. **switch** changes branches, **-c** creates one; **checkout** is the older command that does both jobs.
2728
```[git](/man/git) branch```
@@ -62,7 +63,7 @@ Fix the most recent commit (message or forgotten files), or undo a commit safely
6263
```[git](/man/git) reset --soft HEAD~1```
6364
```[git](/man/git) reset --hard HEAD~1```
6465

65-
> **revert** is safe on shared branches because it only adds a commit. **reset --hard** and **--amend** rewrite history: avoid them on commits you have already pushed.
66+
**revert** is safe on shared branches because it only adds a commit. **reset --hard** and **--amend** rewrite history: avoid them on commits you have already pushed.
6667

6768
Stop tracking files that are now in .gitignore but were committed earlier.
6869
```[git](/man/git) rm -r --cached .```
@@ -76,7 +77,7 @@ Put uncommitted work aside to get a clean working directory, then bring it back
7677
```[git](/man/git) stash pop```
7778
```[git](/man/git) stash apply```
7879

79-
> **pop** applies the stash and removes it from the list; **apply** keeps it around, useful when applying the same work to several branches.
80+
**pop** applies the stash and removes it from the list; **apply** keeps it around, useful when applying the same work to several branches.
8081

8182
## Tags
8283
Tags mark specific commits, typically releases. Annotated tags (**-a**) store author, date, and a message.
@@ -85,25 +86,25 @@ Tags mark specific commits, typically releases. Annotated tags (**-a**) store au
8586
```[git](/man/git) tag -d [tagName]```
8687
```[git](/man/git) push --tags```
8788

88-
> Tags are not pushed by default. Push them explicitly with **--tags** or **git push origin [tagName]**.
89+
Tags are not pushed by default. Push them explicitly with **--tags** or **git push origin [tagName]**.
8990

9091
## Remotes
9192
A remote is a named URL of another copy of the repository; **origin** is the conventional name for the main one.
9293
```[git](/man/git) remote -v```
9394
```[git](/man/git) remote add [remoteName] [remoteURL]```
9495
```[git](/man/git) fetch [remoteName]```
9596
```[git](/man/git) pull [remoteName] [branchName]```
96-
```[git](/man/git) push -u [remoteName] [branchName]```
9797

98-
> **push -u** links the local branch to the remote one, so future **git push** and **git pull** work without arguments.
98+
**push -u** links the local branch to the remote one, so future **git push** and **git pull** work without arguments.
99+
```[git](/man/git) push -u [remoteName] [branchName]```
99100

100101
## Rewriting History
101102
**rebase** replays your commits on top of another branch for a linear history; **cherry-pick** copies a single commit onto the current branch.
102103
```[git](/man/git) rebase [branchName]```
103104
```[git](/man/git) rebase -i HEAD~3```
104105
```[git](/man/git) cherry-pick [commitHash]```
105106

106-
> Interactive rebase (**-i**) lets you reorder, squash, and reword commits. As with **reset**, never rebase commits that others may already have pulled.
107+
Interactive rebase (**-i**) lets you reorder, squash, and reword commits. As with **reset**, never rebase commits that others may already have pulled.
107108

108109
## Getting Help
109110
```[git](/man/git) help [command]```

0 commit comments

Comments
 (0)