LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-22-2018, 05:08 AM   #1
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
How to download compressed archive zip in bulky automatically using wget


How to download compressed archive (zip, 7z, bzip, xz, etc) files from a repository in bulky automatically by use of wget ?
 
Old 02-22-2018, 06:25 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,507

Rep: Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656
WHY "to download compressed archive (zip, 7z, bzip, xz, etc) files from a repository in bulky automatically by use of wget ?"?

Please tell us more.
 
Old 02-22-2018, 06:29 AM   #3
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Original Poster
Rep: Reputation: 15
Because I want to
 
1 members found this post helpful.
Old 02-22-2018, 10:49 AM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,102
Blog Entries: 6

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
How to download compressed archive (zip, 7z, bzip, xz, etc) files from a repository
Code:
agent="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0"

wget -U "$agent" <url> -O MyFile.zip
Quote:
in bulky automatically by use of wget ?
Does that mean there is more than one?
Make a list and loop through them
Code:
list=(
http://www.one.zip
http://www.two.zip
http://www.three.zip
)

a=1
for i in ${list[@]}; do
    wget -U "$agent" "$i" -O "$a".zip
    a=$(($a + 1))
done
Look at man wget
And study how to loop on something in bash.

Code:
for i in {1..10}; do
    echo "$i"
    sleep 1
done
 
Old 02-23-2018, 09:12 AM   #5
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Original Poster
Rep: Reputation: 15
I really get the enlivened idea, I'll try it out.. thanks so much
 
Old 02-24-2018, 07:09 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
you don't even need a shell loop for that, wget can do that all by itself: http://dt.iki.fi/download-filetype-wget
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Append files to compressed .tar.gz archive NevemTeve Programming 10 01-01-2017 01:33 AM
Linux zip program's -d -tt option deletes all files from zip archive Arun Gupta Linux - Software 4 04-27-2011 07:06 PM
using wget to download .zip files nglnx3 Linux - General 5 03-05-2010 06:03 PM
Multi-disk Copy Program Suggestion (Without Archive or Compressed Files) gnurob Linux - Software 9 03-07-2009 03:17 PM
download only zip files using wget command Fond_of_Opensource Linux - Newbie 1 08-09-2006 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration