LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2012, 09:02 AM   #1
sybrenkooistra
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: Disabled
Question Wget "cannot write to"/ "filename too long" problem


First of all - Hi. After hours of not getting any further with this, I figured it was time to join a forum

I'm using wget to download files from a website, and while it works fine for short urls, I get the "file name too long" and "cannot write to '/.." errors.

How does one go about to work around this?

The code/url in question is wget --recursive -A.odt --no-parent --no-check-certificate -nd -P/poging "https://zoek.officielebekendmakingen.nl/zoeken/resultaat/?zkt=Uitgebreid&pst=ParlementaireDocumenten&dpr=AnderePeriode&spd=20100617&epd=20100617&kmr=TweedeKa merderStatenGeneraal&sdt=KenmerkendeDatum&par=Aanhangsel+van+de+Handelingen|Kamervragen+zonder+antwo ord&dst=Onopgemaakt|Opgemaakt|Opgemaakt+na+onopgemaakt&isp=true&pnr=1&rpp=10"

My job sorta depends on me getting this done, so any help is much appreciated
 
Old 08-28-2012, 09:15 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just give it a file name to write to with the -o option (or -O, can't remember which offhand... check the manpage)
 
Old 08-28-2012, 09:26 AM   #3
sybrenkooistra
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
That might work, however, I want to (need to) download multiple files..
 
Old 08-29-2012, 04:37 AM   #4
sybrenkooistra
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have now tried saving it as an extension via code wget --recursive --tries=40 --accept.xml --no-parent -nd -P/poging -O short_name.ext "https://zoek.officielebekendmakingen.nl/zoeken/resultaat/?zkt=Uitgebreid&pst=ParlementaireDocumenten&dpr=AnderePeriode&spd=20100617&epd=20100617&kmr=TweedeKa merderStatenGeneraal&sdt=KenmerkendeDatum&par=Aanhangsel+van+de+Handelingen|Kamervragen+zonder+antwo ord&dst=Onopgemaakt|Opgemaakt|Opgemaakt+na+onopgemaakt&isp=true&pnr=1&rpp=10"


However this still does not really solve the problem, as the extension has become one long file, where I need a collection of files.. Is there a way, perhaps, to save it as an extension that allows for all the files to be unpacked/abstracted from it?

P.s. Why is it that even when I use the accept list I still get other links?

Last edited by sybrenkooistra; 08-29-2012 at 04:40 AM.
 
Old 08-29-2012, 06:06 AM   #5
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
sybrenkooistra, we have a "code" tag to post code, OK? Not the italic font.
 
Old 09-03-2012, 08:27 AM   #6
sybrenkooistra
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Sorry mr. Alex, I'm still new. I'll use the code tage from now on.
 
Old 09-03-2012, 09:53 PM   #7
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
You might be best off writing a script that does it recursively.
 
  


Reply



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
[SOLVED] "tail -n 1 filename" error while "head -n 1 filename" is ok? type8code0 Linux - Newbie 3 03-21-2011 06:10 AM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
How to convert "unsigned long long" to "char pointer"? novicehacker Linux - Kernel 1 11-20-2006 12:57 AM
chrooted user: "write" and "talk" don't work. ldp Linux - Software 2 04-12-2005 02:05 AM
Lost DHCP Lease when putting computer in "Standby" mode for a "long" time pnellesen Linux - Networking 1 01-06-2005 11:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:44 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