PDA

View Full Version : [ubuntu] Ping URL in sources.list



madangopalk
February 5th, 2009, 07:59 AM
Hi

I was trying to ping the urls in sources.list

ex: http://archive.canonical.com/ubuntu dapper-commercial main

with command: ping archive.canonical.com/ubuntu dapper-commercial main

i am only able to ping this : ping archive.canonical.com

is there any way to ping the whole address.

I am doing this because i want to check whether the link exist or not. before using it in my program.

steeleyuk
February 5th, 2009, 09:06 AM
A ping can't tell you whether a link is available, it will only tell you that a server is connected to the network.

madangopalk
February 5th, 2009, 01:02 PM
no but i think it is also used to know whether a website is connected.

ie. if i use ping www.google.com i get a reply..

Kevbert
February 5th, 2009, 01:25 PM
Just copy the address into your browser and see if a page is displayed. If it doesn't exist you'll get a http 404 error. In your example http://archive.canonical.com/ubuntu/dists/dapper-commercial/main/ exists (but with the /).