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:

Tags

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.

Tags

/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!
Tags

ansible

  1. ai ansible
  2. omz plugin enable ansible
  3. 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 [ !
Tags

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 '#|^$'

Tags

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

Tags

tmux

  1. omz plugin load tmux; omz plugin enable tmux
  2. omz reload
  3. 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      
Tags

sort

sort | uniq -c  | sort -nr

Tags

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"."}'

Tags

imediff

Tags

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'

Tags