Code: Select all
$ cat test.txt
123
321
Code: Select all
$ base64 test.txt > test.txt.base64
$ cat test.txt.base64
MTIzCjMyMQo=
To decode the file to its original form, execute the command
Code: Select all
$ base64 -d test.txt.base64
123
321
Code: Select all
[1]$ tar czvf - folder | base64 > folder.tar.tgz.b64
[2]$ base64 -d folder.tar.tgz.b64 | tar xzvf -