Wget and correct zip for command

If there were 3 files put in a folder on /Desktop/Test then transferred to a site.

would

 gzip -r /Desktop/Test 

zip them so that

 wget --http-user cmccabe --http -passwd xxxx*** https://something.sharefile.com/login.aspx -O - | tar -zxf - 

could be used to connect to the site, login, download and extract the file.

Thank you :).

gzip doesn't resemble zip in being an archive that holds multiple files. To create a tar file, you use tar. gzip is involved, but if you un-gzip it, all you get is a tar file, so might as well let tar do everything.

tar -zcf /path/to/file.tar.gz -C /Desktop/test .

I also strongly suspect you can't just blithely use wget on sharefile.com without doing some login things first. --http-user and -passwd are for HTTP basic authentication, which is not the same as the web login forms you find these days.

1 Like

Thanks, I will have to research more on the login to sharefile. Thank you :).

---------- Post updated at 02:42 PM ---------- Previous update was at 01:07 PM ----------

Maybe:

wget --user=username --password --secure-protocol=protocol (talking to IT to figure out if it is auto, SSLv2, SSLv3, or TLSv1) https://something.sharefile.com/login.aspx -O - | tar -zxf - 

Thank you :).

wget's user and passwd are for HTTP basic authentication, which is not the same as the web login forms you find these days. How to use those depends entirely on the webpage and depending on the implementation may involve cookies and javascript.

It may be easier to unzip the files locally after I download them manually, but I will keep looking.

 tar -zcf /path/to/file.tar.gz -C /Desktop/test .

compressed and put in sharefile

folder downloaded to local machine

 tar xf test.tar.gz -C /home/Desktop/Files/

used to extract to folder on desktop. Thank you :).

Should be tar -zxf test.tar.gz though GNU tar will detect those errors and correct them for you.

1 Like

Thank you :).