Linux – View all files in a website’s directory

bashlinuxshell

Is it possible to list all files and directories in a given website directory from the Linux shell?

Something similar to:

ls -l some_directory

but instead of some_directory, it would be ls -l http://www.some_site.com/some_directory/. Obviously, the later will not work.

Best Answer

I was just wondering the same thing. The following is probably not the most efficient solution, but it seems to work. It recreates the directory structure of the webserver locally. (Found the first command via stackoverflow)

wget --spider -r --no-parent http://some.served.dir.ca/
ls -l some.served.dir.ca