clean up lk docs for site

This commit is contained in:
2022-01-16 20:28:02 +01:00
parent e7919416ce
commit 1b8b2a0ae3
11 changed files with 25 additions and 130 deletions

View File

@@ -1,64 +0,0 @@
---
title: "archives"
tags: [ "Documentation", "basics" ]
---
# Tar Archives
To create an archive file, just remember:
*C*reate *z*e *f*ile!
> tar czf file.tar.gz file1 file2
E*x*tract *z*e *f*iles:
> tar xzf file.tar.gz
The .tar extension means two or more files are bundled together into a single file. The .tar.gz means compression.
Tarballs come with a number of arguments.
## More Compression
Extremely compressed files take longer to compress, but take up less disk space.
> tar cfj super-compressed.tar.bz2 file1 file2
# ssh backup of partitions
Back up an unmounted partition with ssh:
> sudo dd if=/dev/sda1 | ssh -C ghost@192.168.0.10 "dd of=/home/ghost/backup.img" status=progress
# `xz`
Install `xz`.
Unzip the image with:
> unxz void.img.xz
This then deletes the .xz file. To keep it:
> unxz --keep void.img.xz
# `zip`
Zip file1-3, into a zip file called 'newzip.zip'.
> zip newsip file1 file2 file3
# Automatic Backups with `find`
## `tar`
Compressing all Latex Files in /home/.
> sudo find ~ -maxdepth 4 -name "*.txt" | xargs tar cvf latex-bundle.tar.gz
## `zip`
Install `zip`.
> find /home/"$(whoami)" -type f -size -2M | xargs zip -u backup

View File

@@ -2,7 +2,6 @@
title: "basics"
tags: [ "Documentation", "basics" ]
---
# Absolute Bloody Basics
You need about a dozen commands to move around Linux.
After that, you look up the rest as you go.

View File

@@ -2,7 +2,6 @@
title: "clock"
tags: [ "Documentation", "basics" ]
---
# `date`
Show system time:

View File

@@ -2,7 +2,7 @@
title: "logs"
tags: [ "Documentation", "basics" ]
---
# Syslog Management Protocols
## Syslog Management Protocols
Let's look at the programs filling in things on our /var/log/ directory.