The bashupload is a place to upload files from command line or other ways and download them elsewhere.

How to upload a directory

In order to upload a directory to a server (or other device), you have to pack/compress it first. Complete command to upload "/var/www/dir" directory is here:

tar -czvf /tmp/dir.tgz /var/www/dir && curl https://bashupload.com/dir.tgz --data-binary @/tmp/dir.tgz

Don't forget to remove "/tmp/dir.tgz" file. After upload is done, download and unpack it:

wget https://bashupload.com/xxxxx/dir.tgz && tar -xvf dir.tgz

By default, tar will pack all dir components based on current dir, in order to change that use "C" option. For example, to make tar archive relative to "/var/www" folder:

tar -C /var/www -czvf /tmp/dir.tgz dir && curl https://bashupload.com/dir.tgz --data-binary @/tmp/dir.tgz

More articles