Curl to download file from subdivx.com after following location without knowing the file name/extens


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Curl to download file from subdivx.com after following location without knowing the file name/extens
# 1  
Old 08-18-2017
Apple Curl to download file from subdivx.com after following location without knowing the file name/extens

This question could be specific to the site subdivx.com In the past, I've been able to download a file following location using cURL but there is something about subdivx.com that's different and can't figure out how to get it to work.

I tried the following directly in the terminal with no success:

Code:
curl -O -J -L http://www.subdivx.com/bajar.php?id=240853&u=7

it returns:

Code:
curl: (6) Could not resolve host: 240853.rar

# 2  
Old 08-18-2017
Part of the problem, I think, is the "&u=7" gets split out into its own little useless background command from the lack of quoting. Try
Quote:
"http://www.subdivx.com/bajar.php?id=240853&u=7"
to make sure the complete URL gets sent.

Also, just wget "http://www.subdivx.com/bajar.php?id=240853&u=7" seemed to work.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 08-18-2017
Thanks @Corona688! This is getting me somewhere now. Both commands work and I'm able to download the file, only thing is that it downloads with a weird name: "bajar.php?id=240853&u=7". If I rename it a get a working file but it would be nice to get the original file name from the server since the files from subdivx.com may be zip or rar files. Any idea on how?
# 4  
Old 08-18-2017
For wget, --trust-server-names will save .rar or .zip. At first glance, curl doesn't appear to have a similar option.
# 5  
Old 08-18-2017
That did it! Thanks! Smilie
I'm new to this forum. Is there a way to select this post as answered by you? Smilie
This User Gave Thanks to MoonD For This Post:
# 6  
Old 08-18-2017
You can add "solved" to the tags, though I just did so. The thread will close by itself, after a few weeks of inactivity.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Curl , download file with user:pass in bash script

Hello, My question is about curl command. (ubuntu14.04) In terminal, I am able to download my mainfile with: curl -u user1:pass1 http://11.22.33.44/******* When I convert it into bash script like this: #!/bin/bash cd /root/scripts computer_ip=11.22.33.44 curl -u $1:$2... (8 Replies)
Discussion started by: baris35
8 Replies

2. Shell Programming and Scripting

Curl parallel download file list

Hello guys, first post sorry if I did some mess here =) Using Ubuntu 14.04lts 64bits server version. I have a list (url.list) with only URLs to download, one per line, that looks like this: http://domain.com/teste.php?a=2&b=3&name=1 http://domain.com/teste.php?a=2&b=3&name=2 ...... (6 Replies)
Discussion started by: tonispa
6 Replies

3. Shell Programming and Scripting

Curl command to download multiple files with a file prefix

I am using the below curl command to download a single file from client server and it is working as expected curl --ftp-ssl -k -u ${USER}:${PASSWD} ftp://${HOST}:${PORT}/path/to/${FILE} --output ${DEST}/${FILE} let say the client has 3 files hellofile.101, hellofile.102, hellofile.103 and I... (3 Replies)
Discussion started by: r@v!7*7@
3 Replies

4. UNIX Desktop Questions & Answers

Knowing the size and location of variables in a C program

So I need some help with this. Pardon me if I'm posting in the wrong forum, after some googling for my answer and finding nothing I found this forum. It seemed appropriate for what I was seeking. I just didnt find a forum that concerned the use of GDB. I'm learning to use the C language and GDB.... (2 Replies)
Discussion started by: Cambria
2 Replies

5. Shell Programming and Scripting

Curl download zip extract large xml file

Hi i have a php script that works 100% however i don't want this to run on php because of server limits etc. Ideally if i could convert this simple php script to a shell script i can set it up to run on a cron. My mac server has curl on it. So i am assuming i should be using this to download the... (3 Replies)
Discussion started by: timgolding
3 Replies

6. UNIX for Advanced & Expert Users

Want to download a latest file with current date from FTP location

Dear Friends, I need help to write a shell / perl script to download the files from FTP location, having different file names (date inside the file name). Example: Mar 5 09:24 cfx_03052013_return_file.txt Mar 6 02:13 cfx_03062013_return_file.txt Mar 7 06:40... (3 Replies)
Discussion started by: Praveen Pandit
3 Replies

7. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies

8. Shell Programming and Scripting

How to download file without curl and wget

Hi I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget. Can anyone will help me go about this task ??? Thanks!! (1 Reply)
Discussion started by: rubber08
1 Replies

9. Shell Programming and Scripting

File created in a different location instead of desired location on using crontab

Hi, I am logging to a linux server through a user "user1" in /home directory. There is a script in a directory in 'root' for which all permissions are available including the directory. This script when executed creates a file in the directory. When the script is added to crontab, on... (1 Reply)
Discussion started by: archana.n
1 Replies

10. UNIX for Advanced & Expert Users

knowing progress while reading a file

Hi, I am parsing a very big file say 10 MB. It 'll take more than an hour ..I want to know the progress say in % .Is there any way to do that??? or (Is there any way to know which line of the file I am in ) (2 Replies)
Discussion started by: sakthi.abdullah
2 Replies
Login or Register to Ask a Question