Download the directory structure of a website without its files

wget

I googled for this but couldn't find an example of how to use eg. wget to download the directory structure of a website without downloading any of its files.

At this point, I just need to understand how a website is organized. I'll mirror the site later.

Best Answer

At the command prompt type:

wget -r --spider www.your-website.com

Alternate command with an option to specify the maximum depth level depth.

wget -r --spider -l depth www.your-website.com

Recursive retrieval options:

-r  
--recursive
    Turn on recursive retrieving.    The default maximum depth is 5.

--spider
    Don't download anything

-l depth
--level=depth
    Specify recursion maximum depth level depth.