Skip to content

Instantly share code, notes, and snippets.

Created January 13, 2016 08:39
Show Gist options
  • Save anonymous/8fa959995cc5f088cae4 to your computer and use it in GitHub Desktop.
Save anonymous/8fa959995cc5f088cae4 to your computer and use it in GitHub Desktop.
Wget dowload data in background with cookies ()
# First you have to create cookies.txt file with copy of all your cookies for required site
# With chrome this extension is useful https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg
wget --load-cookies ./cookies.txt -x -nH -bqc --cut-dirs=5 https://www.example.com/very-large.zip
# Used wget options:
# `-x` Force creation of directories ‘wget -x http://kumekay.com/some/files.txt’ will save the downloaded file to kumekay.com/some/files.txt
# `-nH` Disable generation of host-prefixed directories. By default, invoking Wget with ‘-r http://fly.srk.fer.hr/’ will create a structure of directories beginning with fly.srk.fer.hr/. This option disables such behavior
# `--cut-dirs=NUMBER` Ignore NUMBER remote directory components
# `-b` Go to background after startup
# `-q` Quiet
# `-c` Resume getting a partially-downloaded file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment