diff --git a/sheets/filen b/sheets/filen new file mode 100644 index 0000000..65bf63c --- /dev/null +++ b/sheets/filen @@ -0,0 +1,143 @@ +# filen +# Command-line interface for Filen, an end-to-end encrypted cloud storage provider. +# All data is encrypted client-side before transmission. + +# Authentication and configuration +# Log in interactively with email and password +filen + +# Log in using non-interactive CLI flags +filen --email --password [--two-factor-code <2fa>] + +# Show the currently authenticated account +filen whoami + +# Export auth config to bypass login requests in clustered or server setups +filen export-auth-config + +# Remove saved credentials from the local machine +filen logout + +# Navigation and information +# List files and directories in the root drive +filen ls + +# List a specific remote path with detailed metadata (size, modification date) +filen ls --long /Documents + +# Show drive storage limits and usage statistics +filen statfs + +# Display detailed metadata for a specific file or directory +filen stat /remote/file.txt + +# Print the contents of a remote file to standard output +filen cat /remote/file.txt + +# Print the first or last 20 lines of a remote file +filen head /remote/file.txt -n 20 +filen tail /remote/file.txt -n 20 + +# List recently accessed files or favourited items +filen recents +filen favorites + +# Uploading and downloading +# Upload a local file to a remote directory +filen upload ./file.txt /remote/path/ + +# Upload a local file and rename it on the destination +filen upload report.pdf /Documents/Q1-Report.pdf + +# Upload multiple files using a shell glob pattern +filen upload *.log /Logs/ + +# Write plain text directly into a remote file +filen write /remote/notes.txt "content string" + +# Download a remote file to a local destination +filen download /remote/file.txt ./localfile.txt + +# Download a remote directory to the current working directory +filen download /Backups/project . + +# File operations +# Create a new remote directory structure +filen mkdir /Documents/2026/Q1 + +# Copy a remote file or directory to a new remote location +filen cp /remote/source.txt /remote/backup.txt + +# Move or rename a remote file or directory +filen mv /remote/old-name.txt /remote/new-name.txt + +# Delete a remote file or directory (moves to trash by default) +filen rm /remote/file.txt + +# Permanently delete a remote item, bypassing the trash +filen rm /remote/file.txt --no-trash + +# Download, open in the local default editor, and re-upload on save +filen edit /remote/file.txt + +# Export all encrypted notes to a local directory +filen export-notes ~/filen-notes + +# Synchronisation +# Run an inline two-way sync between a local and remote path +filen sync /local/path:/remote/path + +# Run a one-way local-to-cloud (push) sync +filen sync /local/path:ltc:/remote/path + +# Run a one-way cloud-to-local (pull) sync +filen sync /local/path:ctl:/remote/path + +# Run a continuous two-way sync loop +filen sync /local/path:/remote/path --continuous + +# Execute all configured sync pairs defined in ~/.config/filen-cli/syncPairs.json +filen sync + +# Execute a specific sync pair by its configured alias +filen sync + +# Network mount and server gateways +# Mount the Filen drive as a local filesystem (requires FUSE3) +filen mount /mnt/filen + +# Unmount the local filesystem mount +fusermount3 -u /mnt/filen + +# Start a single-user local WebDAV server +filen webdav --w-user --w-password --w-port 8080 + +# Start a multi-user WebDAV proxy server +filen webdav-proxy --w-port 1900 + +# Start a local S3-compatible server mirroring the drive +filen s3 --s3-access-key-id --s3-secret-access-key --s3-port 9000 + +# Trash and sharing management +# List all items currently in the trash +filen trash + +# Restore or permanently delete a specific trash item +filen trash restore +filen trash delete + +# Empty the trash completely +filen trash empty + +# List all active public shared links +filen links + +# Create, view, or manage a public link for a specific path +filen links /remote/path + +# Maintenance +# Update the CLI binary to the latest stable release +filen install latest + +# Toggle switching to experimental canary releases +filen canary diff --git a/sheets/rsync b/sheets/rsync new file mode 100644 index 0000000..f845754 --- /dev/null +++ b/sheets/rsync @@ -0,0 +1,91 @@ +# rsync +# Fast, versatile, remote and local file copying and synchronisation tool. + +# Basic and archive synchronisation +# Copy files locally while preserving permissions, timestamps, symlinks, and ownership +rsync -a /path/to/source /path/to/destination + +# Synchronise with verbose output, human-readable file sizes, and per-file progress +rsync -avh --progress /path/to/source /path/to/destination + +# Perform a dry run to preview what would be transferred or deleted without altering the destination +rsync -avn /path/to/source /path/to/destination + +# Trailing slash rules +# Copy the directory itself into the destination (creates /destination/source/...) +rsync -a /path/to/source /path/to/destination + +# Copy only the contents of the directory into the destination (creates /destination/...) +rsync -a /path/to/source/ /path/to/destination + +# Remote transfers over SSH +# Synchronise a local directory to a remote host over SSH with data compression +rsync -avz /local/path/ user@remote.host:/remote/path/ + +# Pull a remote directory to a local destination using a non-default SSH port +rsync -av -e "ssh -p 2222" user@remote.host:/remote/path/ /local/path/ + +# Use a specific SSH private key for automated or unattended transfers +rsync -av -e "ssh -i ~/.ssh/backup_key" /local/path/ user@remote.host:/remote/path/ + +# Mirroring and deletion +# Mirror a source directory, deleting files on the destination that no longer exist on the source +rsync -av --delete /path/to/source/ /path/to/destination/ + +# Delete excluded files on the destination and cap total deletions to prevent accidental data loss +rsync -av --delete --delete-excluded --max-delete=100 /path/to/source/ /path/to/destination/ + +# Exclusions and filtering +# Exclude specific files or subdirectories using glob patterns +rsync -av --exclude='*.tmp' --exclude='node_modules/' /path/to/source/ /path/to/destination/ + +# Read exclusion patterns from a plain text file (one pattern per line) +rsync -av --exclude-from='.rsyncignore' /path/to/source/ /path/to/destination/ + +# Advanced metadata preservation +# Preserve hard links, POSIX ACLs, and extended filesystem attributes (including SELinux contexts) +rsync -aHAX /path/to/source/ /path/to/destination/ + +# Performance and network tuning +# Limit network bandwidth consumption to 2000 KiB/s +rsync -av --bwlimit=2000 /path/to/source/ /path/to/destination/ + +# Disable the delta algorithm and transfer entire files (faster on high-speed local networks) +rsync -av --whole-file /path/to/source/ /path/to/destination/ + +# Retain partially transferred files and show progress to resume interrupted migrations +rsync -avP /path/to/source/ /path/to/destination/ + +# Hard link snapshots (incremental backups) +# Create a space-efficient snapshot by hard-linking unchanged files against the previous backup +rsync -a --delete --link-dest=/backup/yesterday/ /home/user/ /backup/today/ + +# Daemon mode connections +# Connect to an unencrypted rsync daemon module over TCP port 873 +rsync -av /local/path/ rsync://user@daemon.host/module_name/ + +# Tunnel rsync daemon protocol traffic through an SSH port forward for security +rsync -av /local/path/ rsync://localhost:8730/module_name/ + +# Verbose debugging and transfer resumption +# Synchronise with extra verbosity (-vv) to inspect skipped files and protocol debugging details, while retaining partial transfers and showing progress (-P) +rsync -avvP /path/to/source/ /path/to/destination/ + +# Perform a dry run with double verbosity to see exactly why individual files are being included or skipped +rsync -avvn /path/to/source/ /path/to/destination/ + +# Advanced SSH transport options +# Connect through an intermediate SSH jump host (bastion server) +rsync -av -e "ssh -J jumpuser@jumphost.example.com" /path/to/source/ targetuser@targethost:/remote/path/ + +# Specify a custom SSH configuration file for complex remote routing or aliases +rsync -av -e "ssh -F /path/to/custom_ssh_config" /path/to/source/ user@remote.host:/remote/path/ + +# Bypass strict host key checking for automated scripts in ephemeral CI/CD environments +rsync -av -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" /path/to/source/ user@remote.host:/remote/path/ + +# Specify a faster SSH cipher to reduce CPU overhead on high-speed, trusted local networks +rsync -av -e "ssh -c aes128-gcm@openssh.com" /path/to/source/ user@remote.host:/remote/path/ + +# Limit SSH connection attempts with a strict timeout (in seconds) to prevent scripts from hanging +rsync -av -e "ssh -o ConnectTimeout=10" /path/to/source/ user@remote.host:/remote/path/ diff --git a/sheets/tar b/sheets/tar index 1b3b568..06edd96 100644 --- a/sheets/tar +++ b/sheets/tar @@ -20,3 +20,19 @@ tar --delete -f xdm_edited.tar.gz xdm # # If a destination (path given to `-C`) is not provided, the CWD will be used. tar -C /mnt -xvf Tarball.tar + +# Create a ZSTD compressed archive +# create an archive using the built-in zstd flag +tar --zstd -cf archive.tar.zst path/to/directory/ + +# Create a multi threaded ZSTD archive +# use all available cpu cores for faster compression on large datasets +tar -I 'zstd -T0' -cf archive.tar.zst path/to/directory/ + +# Create an ultra compressed ZSTD archive +# apply maximum compression level and long distance matching for archival storage +tar -I 'zstd --ultra -22 --long' -cf archive.tar.zst path/to/directory/ + +# LIST ARCHIVE CONTENTS WITH AUTO COMPRESSION +# select the decompression method automatically from the file extension +tar -atf archive.tar.zst