How to "ls *4.2*" on http URL address ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to "ls *4.2*" on http URL address ?
# 1  
Old 04-05-2013
How to "ls *4.2*" on http URL address ?

Hello.
Is there a way to treat internet addresses as hard disk and make
Code:
ls /url/file_name*.rpm

Help is welcome.
# 2  
Old 04-05-2013
No, HTTP does not work that way.
# 3  
Old 04-05-2013
Quote:
Originally Posted by Corona688
No, HTTP does not work that way.
I know that but it should be possible to do something like that in bash using curl or wget. Isn't it.

Code:
linux-gkgc:~ # wget -O - http://download.virtualbox.org/virtualbox/4.2.10
--2013-04-05 18:06:39--  http://download.virtualbox.org/virtualbox/4.2.10
Resolving download.virtualbox.org (download.virtualbox.org)... 137.254.16.69
Connecting to download.virtualbox.org (download.virtualbox.org)|137.254.16.69|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.virtualbox.org/virtualbox/4.2.10/ [following]
--2013-04-05 18:06:39--  http://download.virtualbox.org/virtualbox/4.2.10/
Reusing existing connection to download.virtualbox.org:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `STDOUT'

    [<=>                                                                                     ] 0           --.-K/s              <TITLE>Index of /virtualbox/4.2.10/</TITLE>
<h1>Index of /virtualbox/4.2.10/</h1>
<PRE><IMG SRC="/mc-icons/blank.gif" ALT="     ">  Name                                                             Last modified       Size    Description                       
<HR>
<A HREF="/virtualbox/" NAME="/virtualbox/"><IMG SRC="/mc-icons/back.gif" ALT="[DIR]" BORDER=0>  Parent Directory</A>
<A HREF="MD5SUMS" NAME="MD5SUMS"><IMG SRC="/mc-icons/unknown.gif" ALT="[   ]" BORDER=0>  MD5SUMS</A>                                                          16-Mar-2013 00:15     3K    
<A HREF="Oracle_VM_VirtualBox_Extension_Pack-4.2.10-84104.vbox-extpack" NAME="Oracle_VM_VirtualBox_Extension_Pack-4.2.10-84104.vbox-extpack"><IMG SRC="/mc-icons/unknown.gif" ALT="[   ]" BORDER=0>  Oracle_VM_VirtualBox_Extension_Pack-4.2.10-84104.vbox-extpack</A>    12-Mar-2013 08:01    10M    
<A HREF="Oracle_VM_VirtualBox_Extension_Pack-4.2.10.vbox-extpack" NAME="Oracle_VM_VirtualBox_Extension_Pack-4.2.10.vbox-extpack"><IMG SRC="/mc-icons/unknown.gif" ALT="[   ]" BORDER=0>  Oracle_VM_VirtualBox_Extension_Pack-4.2.10.vbox-extpack</A>          12-Mar-2013 08:01    10M    
.................
.................
.................
.................
.................
<A HREF="virtualbox-4.2_4.2.10-84104~Ubuntu~quantal_amd64.deb" NAME="virtualbox-4.2_4.2.10-84104~Ubuntu~quantal_amd64.deb"><IMG SRC="/mc-icons/unknown.gif" ALT="[   ]" BORDER=0>  virtualbox-4.2_4.2.10-84104~Ubuntu~quantal_amd64.deb</A>             12-Mar-2013 07:57    59M    
<A HREF="virtualbox-4.2_4.2.10-84104~Ubuntu~quantal_i386.deb" NAME="virtualbox-4.2_4.2.10-84104~Ubuntu~quantal_i386.deb"><IMG SRC="/mc-icons/unknown.gif" ALT="[   ]" BORDER=0>  virtualbox-4.2_4.2.10-84104~Ubuntu~quantal_i386.deb</A>              12-Mar-2013 07:57    59M    
    [  <=>                                                                                   ] 13,875      27.5K/s   in 0.5s    

2013-04-05 18:06:40 (27.5 KB/s) - written to stdout [13875]

linux-gkgc:~ #

# 4  
Old 04-05-2013
That webpage is handily configured to give you exactly what you want, a list of files.

Most aren't, and can't be forced to do so by you.

If all you want to do is extract certain links from that particular page, that's certainly possible. Show us exactly what you want please.
# 5  
Old 04-30-2013
I would like to found a specific file ( MozillaFirefox-19.0.2-1.4.1.x86_64.rpm ) on a specific url ( download . opensuse . org/update/12.3/x86_64 ) to be able to download it.

Code:
ls   / / download . opensuse . org/update/*  MozillaFirefox-19.*x86_64.rpm

Which should return if that file exist somewhere

//download.opensuse.org/update/12.3/x86_64/MozillaFirefox-19.0.2-1.4.1.x86_64.rpm

google return :

Index of /update/11.4/rpm/x86_64

or

http://www.google.fr/url?sa=t&rct=j&...45645796,d.d2k

Which is not what I need.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Advanced & Expert Users

How to troubleshoot "Java down" is on my Linux webserver. It caused my web URL to go down.?

On my server java is down which caused my web URL to go down. How could I troubleshoot java related issues on my server (0 Replies)
Discussion started by: vinay2926
0 Replies

3. Open Source

Applescript if url of tab contains "text" click link

this works for what i need it to, but need to add function that will click on link if urloftab contains "300" the last url of each page ends in "300", so i figure that if I add a function that for every tab it open it will also search to see if url contains "300". if it contains "300" click link... (0 Replies)
Discussion started by: ilovedoritos
0 Replies

4. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

5. Red Hat

Nagios is sending "Service Alert: CentOS 5/HTTP is WARNING"

Hello All, I have setup Nagios 3.2.3 on CentOS release 5.7 (Final) with the default config files and added 1 host to it and it is sending "Service Alert: CentOS 5/HTTP is WARNING" frequently, how do you fix this one? what are the additional files that need to be added so that I can monitor the... (0 Replies)
Discussion started by: lovesaikrishna
0 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question