I need a linux COMMAND not solving it using a website.
There isn't one AFAIK. I may be misunderstanding the requirement but it sounds as if you are talking about a "tool", "application" or "utility".

I have seen programs that will parse a website and extract all the links. That would still leave the issue of whether the link was just a page, or another site?

I am also not sure how you could determine whether the site was actually hosted there, rather than just being linked.

Decent security precautions should prevent access to that sort of information I would have thought, unless you are an administrator?

What exactly are you trying to achieve? There may well be web development, maintenance or management tools out there that meet your requirements?