If $("link").length
is returning 0, your selector isn't coming up with anything and there's no hope for getting the link at all.
You need a better selector. Maybe attack it by ID (#linkId) or by a particular class, etc. There's tons of selectors you can use:
http://api.jquery.com/category/selectors/
Your first step is to get the .length to show 1 though. Then from there .attr('href') will give you the link location.
Edit:
Sorry, misinterpreted what you are going for. I was thinking you meant the anchor tag. Here's how I've successfully accessed a link tag:
var links = window.document.getElementsByTagName('link');
$(links).each(function() {
$(this).attr('href') // this is your href for the link tag in the loop
});