Here’s an Apache one-liner I often find myself using. It will list all of the server names and alises that are contained in the active Apache config files on a machine. I’ll go into the parts of the command and how to modify it to suit your needs. This assumes a bash-like shell (with grep, sed, sort, tr and a for loop), root (or permission to run the httpd binary directly) and if you wish to modify the examples, a little command-fu.
tree -d /
- /dev/blog/
- /dev/blog/1337/
- /dev/blog/n00b/
- /home/bryn/
- /home/bryn/bin/
- /home/bryn/bin/git
- /home/bryn/bin/httpd
- /home/bryn/bin/one-liners/
- /home/bryn/bin/svn
- /home/bryn/conf/
- /home/bryn/debug
- /home/bryn/howto/
- /home/bryn/imgdev/
- /home/bryn/LOL/
- /home/bryn/media/
- /home/bryn/notes/
- /home/bryn/src/
- /home/bryn/src/bpmv
- /home/bryn/src/js
- /home/bryn/src/php/
- /home/bryn/src/sh/
- /home/bryn/webdev/
history | grep /dev/blog
You must be logged in to post a comment.