disk/file management
disk
show size
- check disk space:
df
find biggest folders of current directory
du -hs * | sort -rh | head -5
file movements
rsync
Links
- https://wiki.ubuntuusers.de/rsync/
options
a- contains highly recommended-rcopy subfolder-lcopy symbolic links-pkeep permissions of source files-tkeep timestamps of source files-gkeep group permissions of source files-okeep user permissions of source files (only root)-Dkeep device permissions of source files (only root)
v- verboseh- human readablez- with compression-e- remote shell auswählen-e 'ssh -p 222'ändert ssh port auf e.g. 222
local to remote server
rsync [option] [source] user@hostname-or-ip:[destination path]
rsync -avhz /home/source-rsync/ user@your-remote-server.com:/home/dest-rsync/
remote to local server
rsync -avhz user@your-remote-server.com:/home/dest-rsync/ /home/source-rsync/
scp
scp <Optionen> <Quellpfad> <Zielpfad>
- Quellpfad:
<Nutzer>@<Host>:<Verzeichnis/Datei.Endung> - optionen:
-CKompression nutzen (compression)-pDatei-Attribute auf Zieldateien übertragen (permissions)-rVerzeichnisse rekursiv kopieren (recursive)-vErweiterte Ausgabe anzeigen (verbose)-qAusgabe unterdrücken (quiet)-3Daten durch lokales System senden (third party)
example:
scp -r srv01-local_draab:/var/lib/docker/volumes/wireguard_wireguard-config/_data/ /home/danielraab/wireguard/