用tree命令生成本地文件的html页面

tree -H http://abc.123 /var/www > test.html
牛人millenniumdark 那里看到了加强版
http://forum.ubuntu.org.cn//weblog_entry.php?e=5342

代码:

#!/bin/sh
# /usr/local/bin/wsi
tree -H http://weakish.int.eu.org /var/www/ \
| sed -n ‘/<a href="http:/,/<br><br>/p’ \
| sed -e ‘s/<br><br>/<\/pre>/g’ \
| sed -e ‘s/<br>\t\t\t\t//g’ \
| sed -e ‘s/<p><a/<pre><a/g’ \
> siteindex.txt

This entry was posted in GNU/Linux and tagged . Bookmark the permalink.

2 Responses to 用tree命令生成本地文件的html页面

  1. dataw says:

    good thanks

  2. dream1123 says:

    you're welcome 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *