Skip to content

Instantly share code, notes, and snippets.

@samelie
Last active September 19, 2019 16:09
Show Gist options
  • Save samelie/2abff6711ff37a7635c87e4610d59fc4 to your computer and use it in GitHub Desktop.
Save samelie/2abff6711ff37a7635c87e4610d59fc4 to your computer and use it in GitHub Desktop.
rsync ssh + 7z + par2

Prepare files for usenet on a remote server. (dont waste your CPU!)

Upload all the files matching a pattern (Wake*). This assumes ssh config

IdentityFile <PRIVATE_KEY>
HostName <SERVER_IP>
User root
ServerAliveInterval 60
ServerAliveCountMax 2
ForwardX11 yes
PasswordAuthentication no
LogLevel FATAL
ForwardAgent yes

Copy files to:

rsync -v -e ssh Wake* digi_o:~

Copy files from:

rsync -v -e ssh digi_o:~/* mamma

ssh into server and split the file if needed.

7z -v200m a <file_name> <file> (200mb 7z)

7z -v200m a $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) <file>

create par2 files

par2create -r10 <par_name> *.7z.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment