This variation uses CPIO and level 1 GZIP to compress the data.
On the machine to send the files from assuming that the current directory is /mnt/data, issue:
find . -type f | \ cpio -o | \ gzip -1 | \ openssl enc -aes128 -k "password" \ nc SERVER.TLD 10000
where:
. instructs find to send files, via -type f from the current directory recursively,cpio -o,gzip -1 uses one level up gzip compression, meaning just the most basic algorithms to compress the archive,openssl ensures that the compressed archive is encrypted using 128 bit AES and an unsalted key password,nc connects to SERVER.TLD on port 10000 where the files should end upConversely, on the machine receiving the files, issue:
nc -l -p <port> | \ openssl enc -d -aes128 -k "password" gunzip | \ cpio -v -i -d
where:
openssl decrypts the stream using 128 bit AES,gunzip to decompress the decrypted stream andcpio is used to extract the rezulting archive, where:-v means to be verbose,-i means to extract,-d means to create directories
The cpio command sometimes uses the -m flag on the receiving end which instructs cpio to preserve the original modification time of the file. This might be important depending on what the files will be used for because some software is sensitive to the modification time of its files. Otherwise, adding -m is just a waste of time and CPU cycles.
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.