Parallel File Transfer
This documentation provides optimized and parallelized methods for transferring Peertube media data from an LXC container to a remote server. It focuses on speed, reliability, and efficient handling of large file sets. All examples assume the source directory:
/var/lib/lxc/CTNAME/rootfs/var/www/peertube/storage/
and the destination:
Smartmontools
Smartmontools – Comprehensive Monitoring Guide
Overview
Smartmontools is an essential tool for monitoring SSDs and HDDs in modern server environments. It identifies early signs of hardware degradation, provides detailed diagnostics, and integrates seamlessly into automated maintenance workflows. This guide delivers a production‑ready configuration, clear threshold recommendations, structured troubleshooting, operational best practices, and an automated daily health‑check script for the server at1.
/etc/vim/
vim /etc/vim/vimrc
syntax on " Enable syntax highlighting
set background=dark " Optimize color schemes for a dark background
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal!ansible
- ai ansible
- omz plugin enable ansible
- omz plugin info ansible
vim ~/scripts/ansible_structure_setup.sh
#!/bin/bash
# Script Version: 0.8
# Description: Set up Ansible directory structure and necessary files in /etc/ansible
# Create directories
mkdir -p /etc/ansible/{group_vars,host_vars,roles,playbooks}
# Create configuration and inventory files
if [ !grep
Erstes Wort
grep -Eo '^[^ ]+'
Letztes Wort
grep -oE '[^ ]+$'
extract IP addresses
grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'|
exclude lines which begin with "#" or ";"
grep "^[^#;]"
exclude empty lines and contain #
egrep -v '#|^$'
vim
Numeric sort
:sort n
remove duplicate lines
:%sort u
Sorting IP addresses
:%sort n /\.\d\+\./
To adjust the indent on lines
V select lines
> indent
# block
Ctrl v
shift I
#
ESC ESC
replace sequences of spaces with a single tab
:'<,'>s/ \+/\t/g
tmux
- omz plugin load tmux; omz plugin enable tmux
- omz reload
- omz plugin info tmux
| Alias | Command | Description |
| ---------- | -------------------------- | -------------------------------------------------------- |
| `ta` | tmux attach -t | Attach new tmux session to already running named session |
| `tad` | tmux attach -d -t | Detach named tmux session |
| `ts` | tmux new-session -s gh repo clone
- https://github.com/settings/tokens
- ai gh
- gh auth login
- gh repo clone user/repo
sort
sort | uniq -c | sort -nr
awk
skip first column
awk '{$1=""}1'
print only the last column in a record
awk '{print $NF}'
print first 3 numbers from ip address
Delimiter "."
awk -F\. '{print $1"."$2"."$3"."}'
vim plugin
Vim supports plugins to extend its functionality.
- Here are a few popular plugin managers
- Install Plug by adding the following lines to your `.vimrc`:
```
" Install Plug if not already installed
alias
-='cd -'
...=../..
....=../../..
.....=../../../..
......=../../../../..
1='cd -1'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
6='cd -6'
7='cd -7'
8='cd -8'
9='cd -9'
CA='2>&1 | cat -A'