You can show tables with wildcard character on MySQL server.
ie: SHOW TABLES LIKE 'PREFIX_%';
But can't drop multiple tables with '%'.
[HowTo]
For shell script:
for T in `echo "SHOW TABLES" |mysql db|grep "^PREFIX_"`; do echo "DROP TABLE $T;"|mysql db;done
enjoy it.
:D
2012年10月29日 星期一
2012年6月27日 星期三
2011年12月6日 星期二
wget tip
用來用去還是 wget 最好用呀~~
enable cookies
wget --cookies=on --keep-session-cookies --save-cookies=cookie.txt http://your.url
referer url and load cookies
wget --referer=http://your.referer.url --cookies=on --load-cookies=cookie.txt http://your.url
post data
wget --post-file post.txt http://your.url
wget --post-data="type=APP&nick=nickname" http://your.url
in post.txt(on windows)
type=APP&nick=nickname
user agent
--user-agent="Mozilla/5.0"
訂閱:
文章 (Atom)