tag:blogger.com,1999:blog-6589479966773190572024-03-05T20:04:33.898+08:00Jake Tsai BlogAnonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-658947996677319057.post-25356102800779754552013-12-12T00:19:00.001+08:002013-12-12T00:19:26.805+08:00優渥實木 柚木餐桌 開箱文<br />
搬進新家後,一直缺少一張餐桌,都是先用OA電腦桌頂替。<br />
我們一直覺得餐桌在家庭空間占了很重要的部分。<br />
要美觀、實用,又要好整理、耐用,預算又不能太高。<br />
<br />
幾個月以來到處逛家具店,上網看心得文、比較文以後,<br />
終於決定了下手目標。<br />
<br />
<br />
<a name='more'></a><br />
<br />
由於喜歡實木的溫暖與觸感,所以都是鎖定實木餐桌來挑選。<br />
詩肯、優渥、新麗屋、山林希等等比較有名的實木家具,<br />
甚至是上興木材的訂作餐桌,我們都參觀比價過好幾次。<br />
<br />
各店綜合評比考量之後,看上了優渥實木的這一款<br />
<a href="http://uwood.shop.rakuten.tw/wmta13t1/">http://uwood.shop.rakuten.tw/wmta13t1/</a><br />
因為造型比較沒那麼單調呆版,加上優渥的評價都是正面居多。<br />
而且最重要的,優渥的桌面處理是我們比較喜歡的方式。<br />
沒有上太厚的漆面,失去木頭的觸感。<br />
也不是全部不上漆的,太天然的桌面,<br />
被粗手重腳的我們蹂躪,應該很快就會傷痕累累。<br />
<br />
我們去了好幾趟優渥的實體店面,因為每間店展示的桌子不盡相同,<br />
大台北區大約去了四五個門市,每個門市人員也都是很親切的接待解說。<br />
本來就快要決定去門市下訂了,但是剛好遇上樂天拍賣的11/11光棍節特賣,<br />
加上網路門市也有跟實體店面同步的滿萬送千特惠,<br />
所以就從樂天上面網購了,對於親切接待的門市人員,只好說聲抱歉啦。<br />
<br />
<br />
等了一個月餐桌終於飄洋過海到貨了,<br />
跟優渥的配送人員聯絡好日期時間後,師傅們就把我們的餐桌椅送到啦~<br />
<br />
現場開箱組裝的餐桌<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-GM8Gmcv/0/XL/IMG_8538-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-GM8Gmcv/0/XL/IMG_8538-XL.jpg" width="640" /></a></div>
<br />
等待裝上的桌腳<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-7qmH7LQ/0/XL/IMG_8540-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-7qmH7LQ/0/XL/IMG_8540-XL.jpg" width="640" /></a></div>
<br />
師傅熟練而小心的組裝中,可以看到桌腳底有貼上防刮墊,<br />
不用怕移動餐桌的時候,刮花地板<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-5Jdv8Ff/0/XL/IMG_8542-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-5Jdv8Ff/0/XL/IMG_8542-XL.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-9bjV55Q/0/XL/IMG_8545-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-9bjV55Q/0/XL/IMG_8545-XL.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-S2CZh88/0/XL/IMG_8553-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-S2CZh88/0/XL/IMG_8553-XL.jpg" width="640" /></a></div>
<br />
桌腳跟桌面的卡榫,除了螺絲栓緊,多了卡榫應該會更加牢固吧。<br />
桌底面也有骨架加強支撐,板材間也留有伸縮縫隙,<br />
避免熱脹冷縮造成的膨脹凸起。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-f8NgGwk/0/XL/IMG_8546-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-f8NgGwk/0/XL/IMG_8546-XL.jpg" width="426" /></a></div>
<br />
鏘鏘~合體完成~<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-ttV5tCz/0/XL/IMG_8560-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-ttV5tCz/0/XL/IMG_8560-XL.jpg" width="426" /></a></div>
<br />
搭配椅子。<br />
椅子也是優渥實木的產品 <a href="http://uwood.shop.rakuten.tw/wmch09t1/">http://uwood.shop.rakuten.tw/wmch09t1/</a><br />
這張椅子我們也是很喜歡,椅面大,有屁股區的小凹陷,椅背微彎,<br />
坐起來十分舒服,而且沉甸甸的重量,可見用料十分扎實。<br />
不會太高的椅背,放在家裡小小的餐廳中,也不會太顯眼。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-mj5sgJ9/0/XL/IMG_8562-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-mj5sgJ9/0/XL/IMG_8562-XL.jpg" width="426" /></a></div>
<br />
燈光下的餐桌跟家裡木作貼皮的顏色相近,原木的質感果然還是比較溫暖一點。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-JtJHKL8/0/XL/IMG_8570-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-JtJHKL8/0/XL/IMG_8570-XL.jpg" width="426" /></a></div>
<br />
椅面近照,可以看到椅面屁股區的凹陷導角<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-cfVP4RD/0/XL/IMG_8571-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-cfVP4RD/0/XL/IMG_8571-XL.jpg" width="426" /></a></div>
<br />
餐桌特殊的四邊斜角造型,有點造型又不會太 Over,<br />
往下往內收斜角的桌面造型,也讓整張桌子看起來穩重,<br />
但是卻沒有超厚桌板的沉重壓迫感,果然是小空間的首選阿 XD<br />
桌角也配合斜角桌腳做收邊,沒有尖銳的直角,也比較不怕撞到。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-VSs9rK2/0/XL/IMG_8573-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-VSs9rK2/0/XL/IMG_8573-XL.jpg" width="426" /></a></div>
就定位<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-5HXhCKj/0/XL/IMG_8577-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-5HXhCKj/0/XL/IMG_8577-XL.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-tCzmXCq/0/XL/IMG_8583-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-tCzmXCq/0/XL/IMG_8583-XL.jpg" width="640" /></a></div>
<br />
從客廳看過去的樣子<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-bfrdts5/0/XL/IMG_8592-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-bfrdts5/0/XL/IMG_8592-XL.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-dxWrqCQ/0/XL/IMG_8594-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://jaketsai.smugmug.com/Galleries/OpenBox/20131211-%E9%A4%90%E6%A1%8C%E9%96%8B%E7%AE%B1/i-dxWrqCQ/0/XL/IMG_8594-XL.jpg" width="426" /></a></div>
<br />
尋覓了好幾個月的餐桌,終於出現在家裡的餐廳了。<br />
有了正式的餐桌,空間的感覺又更加不一樣了。<br />
看到這樣的空間,應該會讓人想在餐桌上吃飯,<br />
以後就不會搬到電視機前面去吃飯配電視了 XDAnonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com2251台灣新北市淡水區自強路25.1323279 121.46375125.1179524 121.44358100000001 25.1467034 121.483921tag:blogger.com,1999:blog-658947996677319057.post-75712083541155775622013-03-15T13:11:00.000+08:002013-03-15T17:17:03.966+08:002013北馬雙溪馬拉松 初馬心得文2012 年開始參加了一堆大大小小的路跑活動,以賽代訓。從2012/03/18國道馬拉松的初半馬,以02:17:56完賽,到2013/01/20金門馬拉松的半馬,以02:02完賽。總共16場賽事,6場半馬。<br />
自己也忘了是什麼時候決定要把櫻花馬當成初馬來挑戰的。總之,就這樣衝下去,傻傻的把這聽說很硬的櫻花馬,當作初馬,為的就是那漂亮的初馬獎座。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-J-PzMJatNZA/T59mB_HKqHI/AAAAAAAABt4/AnrlNVdzXpU/s1600/6IB0p2VuvtG6sJiCFZ6tng3wL4s%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-J-PzMJatNZA/T59mB_HKqHI/AAAAAAAABt4/AnrlNVdzXpU/s1600/6IB0p2VuvtG6sJiCFZ6tng3wL4s%253D.gif" /></a></div>
<br />
ps. 部分賽道中照片,取自運動筆記、馬拉松世界等運動網站,感謝該網站拍攝與提供照片<br />
<br />
<a name='more'></a><br />
<br />
賽前幾天,並沒有特別的興奮或是緊張情緒,可能是已經參與過兩次櫻花馬的試跑活動,對於傳說中長達9K爬坡,已經有了心理準備。感謝賽事主辦單位貼心的舉辦了這兩次試跑,也有很多的志工熱情的提供了補給,等於報名一次,可以跑三趟,真是太佛心了。<br />
<br />
這麼認真又熱情的主辦單位,真的要好好鼓勵,多多支持一下。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-aiS7Of5YLbo/T59mH8AyD0I/AAAAAAAABuo/piFKE9jc9Eo/s1600/EIw4NSA3k542FBnjM0bPZ7YneZfM%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-aiS7Of5YLbo/T59mH8AyD0I/AAAAAAAABuo/piFKE9jc9Eo/s1600/EIw4NSA3k542FBnjM0bPZ7YneZfM%253D.gif" /></a></div>
<br />
<br />
2013/03/10清早六點,從家裡出發,開上高速公路,接到瑞芳經侯硐的曲折蜿蜒山路,再度來到雙溪這個小鎮,時間還不到七點半,靠近小鎮的道路兩旁,已經停滿車輛,繞進市區,運氣好在離會場不遠的地方,找到了一個停車位,這樣就可以避免跑完鐵腿的情況下,還要多走一大段路才能回到車上了。<br />
<br />
換好球鞋,往雙溪高中走去,操場上滿滿的參賽者,這一次全馬有接近五千人,其中一半跟我一樣都是衝著櫻花馬來跑初馬的跑友。跟其他賽事相比,這場的跑友看起來都是比較認真有經驗的,少了一般賽事的歡樂組,每個人看起來都是有備而來的樣子。<br />
<br />
今年路線更改,先跑10K"比較"平緩的道路,再接上產業道路開始9K的爬坡。據說是因為要消化今年爆炸的參賽者,同時降低一點點難度,讓初馬達成率可以提高一點。先跑10K也是有好有壞啦,可以先當熱身,但是跑完10K也已經消耗了一堆體力,緊接著要再面對爬坡大魔王,也沒有比較輕鬆阿。<br />
<br />
寄完行李包以後,時間也接近八點了,慢慢的往起跑點移動去。先在雙溪高中前拍一下,這邊是終點,起點要再走500公尺到左後方的台二丙線上去。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-J5Svkp9/0/L/P1130593-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-J5Svkp9/0/L/P1130593-L.jpg" width="480" /></a></div>
<br />
<br />
今天的大太陽,完全跟往年櫻花馬濕濕冷冷的天氣截然不同,雖然早晨的陽光很溫暖,但是也開始暗暗擔心跑到中午時分的大太陽,會不會讓我熱昏了。<br />
跟著人潮走到起跑線前,趁空檔把新買的GPS手錶設定好,音樂準備好,隨性的抖抖腳,甩甩手當作熱身活動,就要正式起跑了。<br />
<br />
起跑後1K左右被拍到,在左上角露出半顆頭 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-QVQvprT/0/L/1K-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-QVQvprT/0/L/1K-L.jpg" width="426" /></a></div>
<br />
<br />
因為怕一開始衝太快導致後面落馬,所以前面這10K打算用平均7分速慢慢跑,沒想到腳步還是壓不下來,10K的時間是59:23,剛好是回到雙溪高中前面的距離。<br />
<br />
5K台二丙轉入產業道路前被拍到,太陽曬得我眉頭緊皺啊 ~~<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-NB9GxLD/0/L/5K-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-NB9GxLD/0/L/5K-L.jpg" width="426" /></a></div>
<br />
<br />
這時候看起來已經開始在喘了,10K的疲憊完全寫在臉上跟腳步上 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-G3GNqNh/0/L/P1130603-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-G3GNqNh/0/L/P1130603-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-gxFKKkf/0/L/P1130604-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-gxFKKkf/0/L/P1130604-L.jpg" width="640" /></a></div>
<br />
頭也已經快要抬不起來了 XD<br />
跟別人神采奕奕、怒髮衝冠的樣子落差真大啊~~<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-wb9S4P2/0/L/10K-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-wb9S4P2/0/L/10K-L.jpg" width="426" /></a></div>
<br />
<br />
接下來的上坡路段,從一開始就打定主意上坡就用走的策略下,開始漫長的步兵旅程,中途偶爾會跑起來,但是整體速度也不是挺快的,所以就沒有要求自己要用跑的。慢慢欣賞櫻花跟杜鵑的美麗風景嘛,你說是不是。<br />
<br />
沿路上的補寄站,差不多每四公里就有一站,理所當然的要好好補給一下水分跟能量,補充一下被太陽曬出的一堆汗水。幾乎每一站都是兩三杯水+一棵柑橘+四五顆小番茄,我只能說,櫻花馬的主辦單位真是太佛心了,補給品超豐盛的啦,吃的我邊跑還邊打嗝。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-8i_y_iu43d0/T59mYqlzw_I/AAAAAAAABw8/TSQnOxPiXPQ/s1600/dItteKQyT9SgXpxeYWe9jkoT6vU%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-8i_y_iu43d0/T59mYqlzw_I/AAAAAAAABw8/TSQnOxPiXPQ/s1600/dItteKQyT9SgXpxeYWe9jkoT6vU%253D.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
另外,繼上次太魯閣半馬跑去醫護站向小護士要凡士林塗"改邊"以後,這次因為忘記帶3M透氣膠布,所以又半路跑去找小護士討膠布貼"捏捏頭",可惡的小護士還問人家,需不需要幫忙貼,真是太令人害羞了<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-bMSMC0fDFPM/T59mu2TQaSI/AAAAAAAAB0w/f7bLf954azk/s1600/vEcEh2FVfWFkoA8q3CJRDu65YxVQ%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-bMSMC0fDFPM/T59mu2TQaSI/AAAAAAAAB0w/f7bLf954azk/s1600/vEcEh2FVfWFkoA8q3CJRDu65YxVQ%253D.gif" /></a></div>
<br />
<br />
走走跑跑的來到大約19K蘭平千里的爬升頂點後,接下來到26K折返點,就是漫長的上上下下路段,走完9K的爬坡,這一段路就盡量趁平路跟下坡路段跑起來,但是遇到上坡一樣還是提不起腳步,只好認命的躲到邊邊慢慢走,看著後面的跑友一個個輾過我。<br />
<br />
折返點的照片證明腳步蹣跚、眼神渙散、表情不悅,要是有體力判定儀器,我應該會被直接抓上回收車吧!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-qWPdPk8/0/L/27K_TurnPoint_1-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-qWPdPk8/0/L/27K_TurnPoint_1-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-pxLzHD8/0/L/27K_TurnPoint_2-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-pxLzHD8/0/L/27K_TurnPoint_2-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-tWrzVNL/0/L/27K_TurnPoint_3-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-tWrzVNL/0/L/27K_TurnPoint_3-L.jpg" width="424" /></a></div>
<br />
<br />
這樣走走跑跑走走,走多於跑的情況下,終於撐回到了蘭平千里剩下最後的8.5K了。其實沿途上發現跟我差不多時間的跑友們,遇到上坡也是停下來當步兵,所以可以看到蠻好玩的景象,就是整段路上大家都是默默的走著,帶著沉重的呼吸聲,然後陰涼處就會發現一排人靠著路邊擋土牆在拉筋的景象,這是其他賽事不曾看過的有趣現象。也只有櫻花馬這種山路馬拉松,加上今天這麼"好"的天氣,才能夠看到。<br />
<br />
從這邊開始一連串的下坡路,可以開始慢慢跑起來。但是連續下坡,對於已經無力的雙腳,也是種沉重的負擔,難免會停下來走一段路休息一下,加上每到補給站必備的兩三杯水+一棵柑橘+四五顆小番茄,速度想當然也快不了多少。就這樣在烈日下,跑跑走走的情況下,跑入了終點線,完成了人生的第一馬,也如願拿到了夢寐以求的初馬獎。<br />
<br />
42K接近終點,看到照相機,馬上提起精神,裝作若無其事。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-QP6thns/0/L/41K_1-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-QP6thns/0/L/41K_1-L.jpg" width="358" /></a></div>
<br />
<br />
就算大部分用走的,最後這兩百公尺也是要面帶微笑的跑進終點線。<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe frameborder="0" height="240" scrolling="no" src="http://api.smugmug.com/services/embed/2406344118_tBPz5xV?width=425&height=240&noshare&nohome" width="425"></iframe><br /></div>
<br />
<br />
跑完以後,順利的很快就領到完賽證明、獎牌、還有最重要的初馬獎,當然要來跟初馬三寶拍張合照<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-Rvhjvzk/0/L/P1130618-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-Rvhjvzk/0/L/P1130618-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-nfg7cTX/0/L/P1130619-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-nfg7cTX/0/L/P1130619-L.jpg" width="640" /></a></div>
<br />
<br />
盥洗換裝前,也要幫這次最辛苦的、飽受八十公斤體重摧殘的雙腳拍張紀念照<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-w98sz42/0/L/P1130622-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-w98sz42/0/L/P1130622-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-rWc4Wc4/0/L/P1130624-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-rWc4Wc4/0/L/P1130624-L.jpg" width="480" /></a></div>
<br />
<br />
接下來看看這次初馬的GPS紀錄。<br />
(由於忘記馬上關閉GPS,所以時間比賽會記錄時間長了幾分鐘)<br />
<div style="text-align: center;">
<iframe frameborder="0" height="548" src="http://connect.garmin.com:80/activity/embed/283025800" width="465"></iframe><br /></div>
前面10K大抵維持著6m/K速度,接下來的11K~19K則是因為上坡,速度降到8~10m/K,中間有補給站的話,甚至有拉長到12分的。20~34K的速度則是起伏最大的,因為中間起伏上下的坡度,加上補給站的誘惑,有快到7m/K,也有慢到11~12m/K的慢速。最後的35~42K大體上則是7m/K,除了補給站停下來使得速度會到8.5m/K。為了走更長的路,休息當然是必要的囉。這次加上Garmin 405CX的心跳帶監測,發現除了一開始7,8K的時候不小心衝太快,心跳升高以外,大部分的時間,心跳都維持的蠻平均的,證明果然是慢慢走部隊。<br />
<br />
<br />
最後,就是這次初馬的重頭戲,初馬獎座的寫真時間了<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-gvT2w9m/0/L/IMG_0636-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-gvT2w9m/0/L/IMG_0636-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-29S3GHK/0/L/IMG_0652-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-29S3GHK/0/L/IMG_0652-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-z9xk76j/0/L/IMG_0656-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-z9xk76j/0/L/IMG_0656-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-8pVpNG5/0/L/IMG_0659-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-8pVpNG5/0/L/IMG_0659-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-SfXCKbL/0/L/IMG_0665-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-SfXCKbL/0/L/IMG_0665-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-m5ZXXJx/0/L/IMG_0666-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-m5ZXXJx/0/L/IMG_0666-L.jpg" width="640" /></a></div>
<br />
櫻花三寶大合照<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-WnGGmmN/0/L/IMG_0670-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2013/20130310-%E9%9B%99%E6%BA%AA%E6%AB%BB%E8%8A%B1%E9%A6%AC/i-WnGGmmN/0/L/IMG_0670-L.jpg" width="426" /></a></div>
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-25081749500175319452013-03-07T17:14:00.003+08:002013-03-07T17:14:36.732+08:00Garmin Forerunner 405CX還沒跑初馬,就先敗了初馬獎給自己<br />
<div>
在網路上找了一個看起來價格還不賴的賣家,</div>
<div>
聯絡好面交時間地點,下班就買上衝過去敗家了 </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-HwUDu_1PCK0/T59mP_vyC1I/AAAAAAAABvs/H9ajT6pBlV0/s1600/RYZI6CFT5y3JRjz2kLLzzUESpbA%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-HwUDu_1PCK0/T59mP_vyC1I/AAAAAAAABvs/H9ajT6pBlV0/s1600/RYZI6CFT5y3JRjz2kLLzzUESpbA%253D.gif" /></a></div>
<div>
<a name='more'></a><br /></div>
<div>
回到家以後,二話不說,先來拍個開箱照再說</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-8tzGdmF/0/L/IMG_0371-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="425" src="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-8tzGdmF/0/L/IMG_0371-L.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
打開盒子以後,先看看手錶本身</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-9zBWtNg/0/L/IMG_0377-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-9zBWtNg/0/L/IMG_0377-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-RnJhm4B/0/L/IMG_0374-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-RnJhm4B/0/L/IMG_0374-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-PBHqJts/0/L/IMG_0376-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-PBHqJts/0/L/IMG_0376-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-5gqHqSD/0/L/IMG_0378-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-5gqHqSD/0/L/IMG_0378-L.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
盒裝內的其他配件,由上到下,由左到右依序是:</div>
<div>
帆布材質替換錶帶,充電變壓器與插頭 (附了三種規格的替換插頭) ,手錶,維修更換表帶工具組,替換插頭,替換插頭,GarminConnect USB Dongle,硬式心跳帶。</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-xzSgMMQ/0/L/IMG_0383-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-xzSgMMQ/0/L/IMG_0383-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-Qw9BzDH/0/L/IMG_0386-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/OpenBox/20130305-Garmin-405CX/i-Qw9BzDH/0/L/IMG_0386-L.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
官方產品網頁:</div>
<div>
<a href="https://buy.garmin.com/shop/shop.do?cID=166&pID=31859" target="_blank">Forerunner® 405CX</a></div>
<div>
<br /></div>
<div>
---------------------以下是心得文的分隔線-------------------------------------------------------</div>
<div>
<br /></div>
<div>
2013/03/05 入手後,當晚就先充電,順便研究一下說明書,因為是水貨,所以沒有中文說明書。充電到差不多以後,開始根據說明書,慢慢設定手錶上面的一些參數。花了一點時間在研究心跳帶上面,後來才發現心跳帶要沾水弄濕,再戴上到胸口,才能正確感應,不然手錶會偵測不到心跳帶。因為405CX可以根據身高、體重、心跳率估算消耗的熱量,所以正確接收心跳帶的數值也是很重要的。</div>
<div>
<br /></div>
<div>
全部都搞定以後,戴上手錶,出門走了一小圈,測試各項數值的接收顯示,回到家馬上上傳到 Garmin Connect ,結果看起來十分優秀啊。比以前用手機軟體紀錄來得正確多了,路線不會再跳來跳去,而且重量也比手機輕了不少,只有60G,帶起來也不會很大顆,平常戴了當手錶用也不會覺得突兀,果然是大好物啊。</div>
<div>
<br /></div>
<div>
紀錄網頁在此:</div>
<div>
<iframe frameborder="0" height="548" src="http://connect.garmin.com:80/activity/embed/280763155" width="465"></iframe><br /></div>
<div>
<br /></div>
<div>
2013/03/06 趁著剛敗家的新鮮感還沒過,戴上了心跳帶出門跑了六圈榮星公園,第一次帶心跳帶跑步,有點不習慣,而且可能調太鬆了,跑一跑有點往下掉,偶爾還要調整一下位置,看起來應該有點像女生調整內衣的動作,路上的行人應該會覺得這個人怪怪的吧 XD<br />
<br />
路跑紀錄隨後補上<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-79578841319316070962013-01-02T18:04:00.001+08:002013-01-02T18:04:27.470+08:00[轉]UNIX TOOLBOX有用的 Unix 資訊<br />
<br />
轉錄+備份<br />
Source : http://cb.vu/unixtoolbox.xhtml<br />
<br />
<br />
<a name='more'></a><br />
<br />
<div class="title" style="background-color: white; color: #000040; font-family: verdana, arial, sans-serif; font-size: 32px; font-weight: bold; letter-spacing: 0.22em; padding: 1em 0px; text-align: center; text-transform: uppercase;">
UNIX TOOLBOX</div>
<div class="abstract" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.<br /></div>
<div class="footerfirst" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
Unix Toolbox revision 14.4<br />The latest version of this document can be found at <a href="http://cb.vu/unixtoolbox.xhtml" style="background-color: transparent; color: #000040;">http://cb.vu/unixtoolbox.xhtml</a>. Replace .xhtml on the link with <a href="http://cb.vu/unixtoolbox.pdf" style="background-color: transparent; color: #000040;">.pdf</a> for the PDF version and with <a href="http://cb.vu/unixtoolbox.book.pdf" style="background-color: transparent; color: #000040;">.book.pdf</a>for the booklet version. On a duplex printer the booklet will create a small book ready to bind. <span class="web">This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the <a class="xref" href="http://cb.vu/unixtoolbox.xhtml#bourneexample" style="background-color: transparent; color: #000040;">script example</a>).</span> See also the <a href="http://cb.vu/unixtoolbox" style="background-color: transparent; color: #000040;">about page</a>.<br />Error reports and comments are most welcome - <a href="mailto:c\at\cb.vu" style="background-color: transparent; color: #000040;">c@cb.vu</a> Colin Barschel.<div class="copyright">
© <a href="mailto:c_at_cb.vu" style="background-color: transparent; color: #000040;">Colin Barschel</a> 2007-2012. <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license" style="background-color: transparent; color: #000040;">Some rights reserved under Creative Commons</a>.</div>
</div>
<br /><div class="pb" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
</div>
<div id="sysinfo" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">SYSTEM</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#hardwareinfo" style="background-color: transparent; color: #000040;">Hardware</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#loadstats" style="background-color: transparent; color: #000040;">Statistics</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#users" style="background-color: transparent; color: #000040;">Users</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#limits" style="background-color: transparent; color: #000040;">Limits</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#runlevels" style="background-color: transparent; color: #000040;">Runlevels</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#resetpasswd" style="background-color: transparent; color: #000040;">root password</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#compilekernel" style="background-color: transparent; color: #000040;">Compile kernel</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#grub" style="background-color: transparent; color: #000040;">Repair grub</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#sysmisc" style="background-color: transparent; color: #000040;">Misc</a></div>
Running kernel and system information<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># uname -a <span class="cmt" style="background-color: transparent; color: #000040;"># Get the kernel version (and BSD version)</span>
# lsb_release -a <span class="cmt" style="background-color: transparent; color: #000040;"># Full release info of any LSB distribution</span>
# cat /etc/SuSE-release <span class="cmt" style="background-color: transparent; color: #000040;"># Get SuSE version</span>
# cat /etc/debian_version <span class="cmt" style="background-color: transparent; color: #000040;"># Get Debian version</span>
</pre>
Use /etc/<code style="color: #003300;">DISTR</code>-release with <code style="color: #003300;">DISTR=</code> lsb (Ubuntu), redhat, gentoo, mandrake, sun (Solaris), and so on. See also <code style="color: #003300;">/etc/issue</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># uptime <span class="cmt" style="background-color: transparent; color: #000040;"># Show how long the system has been running + load</span>
# hostname <span class="cmt" style="background-color: transparent; color: #000040;"># system's host name</span>
# hostname -i <span class="cmt" style="background-color: transparent; color: #000040;"># Display the IP address of the host. (Linux only)</span>
# man hier <span class="cmt" style="background-color: transparent; color: #000040;"># Description of the file system hierarchy</span>
# last reboot <span class="cmt" style="background-color: transparent; color: #000040;"># Show system reboot history</span>
</pre>
<h2 id="hardwareinfo" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Hardware Informations</h2>
Kernel detected hardware<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dmesg <span class="cmt" style="background-color: transparent; color: #000040;"># Detected hardware and boot messages</span>
# lsdev <span class="cmt" style="background-color: transparent; color: #000040;"># information about installed hardware</span>
# dd if=/dev/mem bs=1k skip=768 count=256 2>/dev/null | strings -n 8 <span class="cmt" style="background-color: transparent; color: #000040;"># Read BIOS</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat /proc/cpuinfo <span class="cmt" style="background-color: transparent; color: #000040;"># CPU model</span>
# cat /proc/meminfo <span class="cmt" style="background-color: transparent; color: #000040;"># Hardware memory</span>
# grep MemTotal /proc/meminfo <span class="cmt" style="background-color: transparent; color: #000040;"># Display the physical memory</span>
# watch -n1 'cat /proc/interrupts' <span class="cmt" style="background-color: transparent; color: #000040;"># Watch changeable interrupts continuously</span>
# free -m <span class="cmt" style="background-color: transparent; color: #000040;"># Used and free memory (-m for MB)</span>
# cat /proc/devices <span class="cmt" style="background-color: transparent; color: #000040;"># Configured devices</span>
# lspci -tv <span class="cmt" style="background-color: transparent; color: #000040;"># Show PCI devices</span>
# lsusb -tv <span class="cmt" style="background-color: transparent; color: #000040;"># Show USB devices</span>
# lshal <span class="cmt" style="background-color: transparent; color: #000040;"># Show a list of all devices with their properties</span>
# dmidecode <span class="cmt" style="background-color: transparent; color: #000040;"># Show DMI/SMBIOS: hw info from the BIOS</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sysctl hw.model <span class="cmt" style="background-color: transparent; color: #000040;"># CPU model</span>
# sysctl hw <span class="cmt" style="background-color: transparent; color: #000040;"># Gives a lot of hardware information</span>
# sysctl hw.ncpu <span class="cmt" style="background-color: transparent; color: #000040;"># number of active CPUs installed</span>
# sysctl vm <span class="cmt" style="background-color: transparent; color: #000040;"># Memory usage</span>
# sysctl hw.realmem <span class="cmt" style="background-color: transparent; color: #000040;"># Hardware memory</span>
# sysctl -a | grep mem <span class="cmt" style="background-color: transparent; color: #000040;"># Kernel memory settings and info</span>
# sysctl dev <span class="cmt" style="background-color: transparent; color: #000040;"># Configured devices</span>
# pciconf -l -cv <span class="cmt" style="background-color: transparent; color: #000040;"># Show PCI devices</span>
# usbdevs -v <span class="cmt" style="background-color: transparent; color: #000040;"># Show USB devices</span>
# atacontrol list <span class="cmt" style="background-color: transparent; color: #000040;"># Show ATA devices</span>
# camcontrol devlist -v <span class="cmt" style="background-color: transparent; color: #000040;"># Show SCSI devices</span>
</pre>
<h2 id="loadstats" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Load, statistics and messages</h2>
The following commands are useful to find out what is going on on the system.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># top <span class="cmt" style="background-color: transparent; color: #000040;"># display and update the top cpu processes</span>
# mpstat 1 <span class="cmt" style="background-color: transparent; color: #000040;"># display processors related statistics</span>
# vmstat 2 <span class="cmt" style="background-color: transparent; color: #000040;"># display virtual memory statistics</span>
# iostat 2 <span class="cmt" style="background-color: transparent; color: #000040;"># display I/O statistics (2 s intervals)</span>
# systat -vmstat 1 <span class="cmt" style="background-color: transparent; color: #000040;"># BSD summary of system statistics (1 s intervals)</span>
# systat -tcp 1 <span class="cmt" style="background-color: transparent; color: #000040;"># BSD tcp connections (try also -ip)</span>
# systat -netstat 1 <span class="cmt" style="background-color: transparent; color: #000040;"># BSD active network connections</span>
# systat -ifstat 1 <span class="cmt" style="background-color: transparent; color: #000040;"># BSD network traffic through active interfaces</span>
# systat -iostat 1 <span class="cmt" style="background-color: transparent; color: #000040;"># BSD CPU and and disk throughput</span>
# ipcs -a <span class="cmt" style="background-color: transparent; color: #000040;"># information on System V interprocess</span>
# tail -n 500 /var/log/messages <span class="cmt" style="background-color: transparent; color: #000040;"># Last 500 kernel/syslog messages</span>
# tail /var/log/warn <span class="cmt" style="background-color: transparent; color: #000040;"># System warnings messages see syslog.conf</span>
</pre>
<h2 id="users" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Users</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># id <span class="cmt" style="background-color: transparent; color: #000040;"># Show the active user id with login and group</span>
# last <span class="cmt" style="background-color: transparent; color: #000040;"># Show last logins on the system</span>
# who <span class="cmt" style="background-color: transparent; color: #000040;"># Show who is logged on the system</span>
# groupadd admin <span class="cmt" style="background-color: transparent; color: #000040;"># Add group "admin" and user colin (Linux/Solaris)</span>
# useradd -c "Colin Barschel" -g admin -m colin
# usermod -a -G <group> <user> <span class="cmt" style="background-color: transparent; color: #000040;"># Add existing user to group (Debian)</span>
# groupmod -A <user> <group> <span class="cmt" style="background-color: transparent; color: #000040;"># Add existing user to group (SuSE)</span>
# userdel colin <span class="cmt" style="background-color: transparent; color: #000040;"># Delete user colin (Linux/Solaris)</span>
# adduser joe <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD add user joe (interactive)</span>
# rmuser joe <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD delete user joe (interactive)</span>
# pw groupadd admin <span class="cmt" style="background-color: transparent; color: #000040;"># Use pw on FreeBSD</span>
# pw groupmod admin -m newmember <span class="cmt" style="background-color: transparent; color: #000040;"># Add a new member to a group</span>
# pw useradd colin -c "Colin Barschel" -g admin -m -s /bin/tcsh
# pw userdel colin; pw groupdel admin
</pre>
Encrypted passwords are stored in /etc/shadow for Linux and Solaris and /etc/master.passwd on FreeBSD. If the master.passwd is modified manually (say to delete a password), run <code style="color: #003300;"># pwd_mkdb -p master.passwd</code> to rebuild the database.<br /><br />To temporarily prevent logins system wide (for all users but root) use nologin. The message in nologin will be displayed (might not work with ssh pre-shared keys).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># echo "Sorry no login now" > /etc/nologin <span class="cmt" style="background-color: transparent; color: #000040;"># (Linux)</span>
# echo "Sorry no login now" > /var/run/nologin <span class="cmt" style="background-color: transparent; color: #000040;"># (FreeBSD)</span>
</pre>
<h2 id="limits" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Limits</h2>
Some application require higher limits on open files and sockets (like a proxy web server, database). The default limits are usually too low.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Per shell/script</h4>
The shell limits are governed by <code style="color: #003300;">ulimit</code>. The status is checked with <code style="color: #003300;">ulimit -a</code>. For example to change the open files limit from 1024 to 10240 do:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ulimit -n 10240 <span class="cmt" style="background-color: transparent; color: #000040;"># This is only valid within the shell</span>
</pre>
The <code style="color: #003300;">ulimit</code> command can be used in a script to change the limits for the script only.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Per user/process</h4>
Login users and applications can be configured in <code style="color: #003300;">/etc/security/limits.conf</code>. For example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat /etc/security/limits.conf
* hard nproc 250 <span class="cmt" style="background-color: transparent; color: #000040;"># Limit user processes</span>
asterisk hard nofile 409600 <span class="cmt" style="background-color: transparent; color: #000040;"># Limit application open files</span>
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
System wide</h4>
Kernel limits are set with sysctl. Permanent limits are set in <code style="color: #003300;">/etc/sysctl.conf</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sysctl -a <span class="cmt" style="background-color: transparent; color: #000040;"># View all system limits</span>
# sysctl fs.file-max <span class="cmt" style="background-color: transparent; color: #000040;"># View max open files limit</span>
# sysctl fs.file-max=102400 <span class="cmt" style="background-color: transparent; color: #000040;"># Change max open files limit</span>
# echo "1024 50000" > /proc/sys/net/ipv4/ip_local_port_range <span class="cmt" style="background-color: transparent; color: #000040;"># port range</span>
# cat /etc/sysctl.conf
fs.file-max=102400 <span class="cmt" style="background-color: transparent; color: #000040;"># Permanent entry in sysctl.conf</span>
# cat /proc/sys/fs/file-nr <span class="cmt" style="background-color: transparent; color: #000040;"># How many file descriptors are in use</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Per shell/script</h4>
Use the command <code style="color: #003300;">limits</code> in csh or tcsh or as in Linux, use <code style="color: #003300;">ulimit</code> in an sh or bash shell.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Per user/process</h4>
The default limits on login are set in <code style="color: #003300;">/etc/login.conf</code>. An unlimited value is still limited by the system maximal value.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
System wide</h4>
Kernel limits are also set with sysctl. Permanent limits are set in <code style="color: #003300;">/etc/sysctl.conf</code> or <code style="color: #003300;">/boot/loader.conf</code>. The syntax is the same as Linux but the keys are different.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sysctl -a <span class="cmt" style="background-color: transparent; color: #000040;"># View all system limits</span>
# sysctl kern.maxfiles=XXXX <span class="cmt" style="background-color: transparent; color: #000040;"># maximum number of file descriptors</span>
kern.ipc.nmbclusters=32768 <span class="cmt" style="background-color: transparent; color: #000040;"># Permanent entry in /etc/sysctl.conf</span>
kern.maxfiles=65536 <span class="cmt" style="background-color: transparent; color: #000040;"># Typical values for Squid</span>
kern.maxfilesperproc=32768
kern.ipc.somaxconn=8192 <span class="cmt" style="background-color: transparent; color: #000040;"># TCP queue. Better for apache/sendmail</span>
# sysctl kern.openfiles <span class="cmt" style="background-color: transparent; color: #000040;"># How many file descriptors are in use</span>
# sysctl kern.ipc.numopensockets <span class="cmt" style="background-color: transparent; color: #000040;"># How many open sockets are in use</span>
# sysctl net.inet.ip.portrange.last=50000 <span class="cmt" style="background-color: transparent; color: #000040;"># Default is 1024-5000</span>
# netstat -m <span class="cmt" style="background-color: transparent; color: #000040;"># network memory buffers statistics</span>
</pre>
See The <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-kernel-limits.html" style="background-color: transparent; color: #000040;">FreeBSD handbook Chapter 11</a> for details. And also <a href="http://serverfault.com/questions/64356/freebsd-performance-tuning-sysctls-loader-conf-kernel" style="background-color: transparent; color: #000040;">FreeBSD performance tuning</a><h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Solaris</h3>
The following values in <code style="color: #003300;">/etc/system</code> will increase the maximum file descriptors per proc:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">set rlim_fd_max = 4096 <span class="cmt" style="background-color: transparent; color: #000040;"># Hard limit on file descriptors for a single proc</span>
set rlim_fd_cur = 1024 <span class="cmt" style="background-color: transparent; color: #000040;"># Soft limit on file descriptors for a single proc</span>
</pre>
<h2 id="runlevels" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Runlevels</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
Once booted, the kernel starts <code style="color: #003300;">init</code> which then starts <code style="color: #003300;">rc</code> which starts all scripts belonging to a runlevel. The scripts are stored in /etc/init.d and are linked into /etc/rc.d/rcN.d with N the runlevel number.<br />The default runlevel is configured in /etc/inittab. It is usually 3 or 5:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># grep default: /etc/inittab
id:3:initdefault:
</pre>
The actual runlevel can be changed with <code style="color: #003300;">init</code>. For example to go from 3 to 5:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># init 5 <span class="cmt" style="background-color: transparent; color: #000040;"># Enters runlevel 5</span></pre>
<ul style="list-style-type: none; page-break-inside: avoid;">
<li>0 Shutdown and halt</li>
<li>1 Single-User mode (also S)</li>
<li>2 Multi-user without network</li>
<li>3 Multi-user with network</li>
<li>5 Multi-user with X</li>
<li>6 Reboot</li>
</ul>
Use <code style="color: #003300;">chkconfig</code> to configure the programs that will be started at boot in a runlevel.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># chkconfig --list <span class="cmt" style="background-color: transparent; color: #000040;"># List all init scripts</span>
# chkconfig --list sshd <span class="cmt" style="background-color: transparent; color: #000040;"># Report the status of sshd</span>
# chkconfig sshd --level 35 on <span class="cmt" style="background-color: transparent; color: #000040;"># Configure sshd for levels 3 and 5</span>
# chkconfig sshd off <span class="cmt" style="background-color: transparent; color: #000040;"># Disable sshd for all runlevels</span>
</pre>
Debian and Debian based distributions like Ubuntu or Knoppix use the command <code style="color: #003300;">update-rc.d</code> to manage the runlevels scripts. Default is to start in 2,3,4 and 5 and shutdown in 0,1 and 6.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># update-rc.d sshd defaults <span class="cmt" style="background-color: transparent; color: #000040;"># Activate sshd with the default runlevels</span>
# update-rc.d sshd start 20 2 3 4 5 . stop 20 0 1 6 . <span class="cmt" style="background-color: transparent; color: #000040;"># With explicit arguments</span>
# update-rc.d -f sshd remove <span class="cmt" style="background-color: transparent; color: #000040;"># Disable sshd for all runlevels</span>
# shutdown -h now (or # poweroff) <span class="cmt" style="background-color: transparent; color: #000040;"># Shutdown and halt the system</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
The BSD boot approach is different from the SysV, there are no runlevels. The final boot state (single user, with or without X) is configured in <code style="color: #003300;">/etc/ttys</code>. All OS scripts are located in <code style="color: #003300;">/etc/rc.d/</code> and in <code style="color: #003300;">/usr/local/etc/rc.d/</code> for third-party applications. The activation of the service is configured in <code style="color: #003300;">/etc/rc.conf</code> and<code style="color: #003300;">/etc/rc.conf.local</code>. The default behavior is configured in <code style="color: #003300;">/etc/defaults/rc.conf</code>. The scripts responds at least to start|stop|status.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># /etc/rc.d/sshd status
sshd is running as pid 552.
# shutdown now <span class="cmt" style="background-color: transparent; color: #000040;"># Go into single-user mode</span>
# exit <span class="cmt" style="background-color: transparent; color: #000040;"># Go back to multi-user mode</span>
# shutdown -p now <span class="cmt" style="background-color: transparent; color: #000040;"># Shutdown and halt the system</span>
# shutdown -r now <span class="cmt" style="background-color: transparent; color: #000040;"># Reboot</span>
</pre>
The process <code style="color: #003300;">init</code> can also be used to reach one of the following states level. For example <code style="color: #003300;"># init 6</code> for reboot.<ul style="list-style-type: none; page-break-inside: avoid;">
<li>0 Halt and turn the power off (signal <code style="color: #003300;">USR2</code>)</li>
<li>1 Go to single-user mode (signal <code style="color: #003300;">TERM</code>)</li>
<li>6 Reboot the machine (signal <code style="color: #003300;">INT</code>)</li>
<li>c Block further logins (signal <code style="color: #003300;">TSTP</code>)</li>
<li>q Rescan the ttys(5) file (signal <code style="color: #003300;">HUP</code>)</li>
</ul>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Windows</h3>
Start and stop a service with either the <code style="color: #003300;">service name</code> or <code style="color: #003300;">"service description"</code> (shown in the Services Control Panel) as follows:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">net stop WSearch
net start WSearch <span class="cmt" style="background-color: transparent; color: #000040;"># start search service</span>
net stop "Windows Search"
net start "Windows Search" <span class="cmt" style="background-color: transparent; color: #000040;"># same as above using descr.</span>
</pre>
<h2 id="resetpasswd" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Reset root password</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux method 1</h3>
At the boot loader (lilo or grub), enter the following boot option:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">init=/bin/sh</pre>
The kernel will mount the root partition and <code style="color: #003300;">init</code> will start the bourne shell instead of <code style="color: #003300;">rc</code> and then a runlevel. Use the command <code style="color: #003300;">passwd</code> at the prompt to change the password and then reboot. Forget the single user mode as you need the password for that.<br />If, after booting, the root partition is mounted read only, remount it rw:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -o remount,rw /
# passwd <span class="cmt" style="background-color: transparent; color: #000040;"># or delete the root password (/etc/shadow)</span>
# sync; mount -o remount,ro / <span class="cmt" style="background-color: transparent; color: #000040;"># sync before to remount read only</span>
# reboot
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD method 1</h3>
On FreeBSD, boot in single user mode, remount / rw and use passwd. You can select the single user mode on the boot menu (option 4) which is displayed for 10 seconds at startup. The single user mode will give you a root shell on the / partition.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -u /; mount -a <span class="cmt" style="background-color: transparent; color: #000040;"># will mount / rw</span>
# passwd
# reboot
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Unixes and FreeBSD and Linux method 2</h3>
Other Unixes might not let you go away with the simple init trick. The solution is to mount the root partition from an other OS (like a rescue CD) and change the password on the disk.<ul>
<li>Boot a live CD or installation CD into a rescue mode which will give you a shell.</li>
<li>Find the root partition with fdisk e.g. fdisk /dev/sda</li>
<li>Mount it and use chroot:</li>
</ul>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -o rw /dev/ad4s3a /mnt
# chroot /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># chroot into /mnt</span>
# passwd
# reboot
</pre>
<h2 id="kernelmodules" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Kernel modules</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># lsmod <span class="cmt" style="background-color: transparent; color: #000040;"># List all modules loaded in the kernel</span>
# modprobe isdn <span class="cmt" style="background-color: transparent; color: #000040;"># To load a module (here isdn)</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># kldstat <span class="cmt" style="background-color: transparent; color: #000040;"># List all modules loaded in the kernel</span>
# kldload crypto <span class="cmt" style="background-color: transparent; color: #000040;"># To load a module (here crypto)</span>
</pre>
<h2 id="compilekernel" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Compile Kernel</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd /usr/src/linux
# make mrproper <span class="cmt" style="background-color: transparent; color: #000040;"># Clean everything, including config files</span>
# make oldconfig <span class="cmt" style="background-color: transparent; color: #000040;"># Reuse the old .config if existent</span>
# make menuconfig <span class="cmt" style="background-color: transparent; color: #000040;"># or xconfig (Qt) or gconfig (GTK)</span>
# make <span class="cmt" style="background-color: transparent; color: #000040;"># Create a compressed kernel image</span>
# make modules <span class="cmt" style="background-color: transparent; color: #000040;"># Compile the modules</span>
# make modules_install <span class="cmt" style="background-color: transparent; color: #000040;"># Install the modules</span>
# make install <span class="cmt" style="background-color: transparent; color: #000040;"># Install the kernel</span>
# reboot
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
Optionally update the source tree (in <code style="color: #003300;">/usr/src</code>) with csup (as of FreeBSD 6.2 or later):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># csup <supfile></pre>
I use the following supfile:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">*default host=cvsup5.FreeBSD.org # www.freebsd.org/handbook/cvsup.html#CVSUP-MIRRORS
*default prefix=/usr
*default base=/var/db
*default release=cvs delete tag=RELENG_7
src-all
</pre>
To modify and rebuild the kernel, copy the generic configuration file to a new name and edit it as needed (you can also edit the file <code style="color: #003300;">GENERIC</code> directly). To restart the build after an interruption, add the option <code style="color: #003300;">NO_CLEAN=YES</code> to the make command to avoid cleaning the objects already build.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd /usr/src/sys/i386/conf/
# cp GENERIC MYKERNEL
# cd /usr/src
# make buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL
</pre>
To rebuild the full OS:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># make buildworld <span class="cmt" style="background-color: transparent; color: #000040;"># Build the full OS but not the kernel</span>
# make buildkernel <span class="cmt" style="background-color: transparent; color: #000040;"># Use KERNCONF as above if appropriate</span>
# make installkernel
# reboot
# mergemaster -p <span class="cmt" style="background-color: transparent; color: #000040;"># Compares only files known to be essential</span>
# make installworld
# mergemaster -i -U <span class="cmt" style="background-color: transparent; color: #000040;"># Update all configurations and other files</span>
# reboot
</pre>
For small changes in the source you can use NO_CLEAN=yes to avoid rebuilding the whole tree.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># make buildworld NO_CLEAN=yes <span class="cmt" style="background-color: transparent; color: #000040;"># Don't delete the old objects</span>
# make buildkernel KERNCONF=MYKERNEL NO_CLEAN=yes
</pre>
<h2 id="grub" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Repair grub</h2>
So you broke grub? Boot from a live cd, [find your linux partition under <code style="color: #003300;">/dev</code> and use <code style="color: #003300;">fdisk</code> to find the linux partion] mount the linux partition, add /proc and /dev and use <code style="color: #003300;">grub-install /dev/xyz</code>. Suppose linux lies on <code style="color: #003300;">/dev/sda6</code>:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount /dev/sda6 /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># mount the linux partition on /mnt</span>
# mount --bind /proc /mnt/proc <span class="cmt" style="background-color: transparent; color: #000040;"># mount the proc subsystem into /mnt</span>
# mount --bind /dev /mnt/dev <span class="cmt" style="background-color: transparent; color: #000040;"># mount the devices into /mnt</span>
# chroot /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># change root to the linux partition</span>
# grub-install /dev/sda <span class="cmt" style="background-color: transparent; color: #000040;"># reinstall grub with your old settings</span>
</pre>
<h2 id="sysmisc" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Misc</h2>
Disable OSX virtual memory (repeat with <code style="color: #003300;">load</code> to re-enable). Faster system, but a little risky.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
# sleep 3600; pmset sleepnow <span class="cmt" style="background-color: transparent; color: #000040;"># go to standby in one hour (OSX)</span>
# defaults write -g com.apple.mouse.scaling -float 8
<span class="cmt" style="background-color: transparent; color: #000040;"># OSX mouse acceleration (use -1 to reverse)</span>
</pre>
</div>
<div id="processes" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">PROCESSES</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#ps" style="background-color: transparent; color: #000040;">Listing</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#nice" style="background-color: transparent; color: #000040;">Priority</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#bgfg" style="background-color: transparent; color: #000040;">Background/Foreground</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#top" style="background-color: transparent; color: #000040;">Top</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#kill" style="background-color: transparent; color: #000040;">Kill</a></div>
<h2 id="ps" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Listing and PIDs</h2>
Each process has a unique number, the PID. A list of all running process is retrieved with <code style="color: #003300;">ps</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ps -auxefw <span class="cmt" style="background-color: transparent; color: #000040;"># Extensive list of all running process</span></pre>
However more typical usage is with a pipe or with <code style="color: #003300;">pgrep</code> (for OS X install <code style="color: #003300;">proctools</code> from <a class="xref" href="http://cb.vu/unixtoolbox.xhtml#macports" style="background-color: transparent; color: #000040;">MacPorts</a>):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ps axww | grep cron
586 ?? Is 0:01.48 /usr/sbin/cron -s
# ps axjf <span class="cmt" style="background-color: transparent; color: #000040;"># All processes in a tree format (Linux)</span>
# ps aux | grep 'ss[h]' <span class="cmt" style="background-color: transparent; color: #000040;"># Find all ssh pids without the grep pid</span>
# pgrep -l sshd <span class="cmt" style="background-color: transparent; color: #000040;"># Find the PIDs of processes by (part of) name</span>
# echo $$ <span class="cmt" style="background-color: transparent; color: #000040;"># The PID of your shell</span>
# fuser -va 22/tcp <span class="cmt" style="background-color: transparent; color: #000040;"># List processes using port 22 (Linux)</span>
# pmap PID <span class="cmt" style="background-color: transparent; color: #000040;"># Memory map of process (hunt memory leaks) (Linux)</span>
# fuser -va /home <span class="cmt" style="background-color: transparent; color: #000040;"># List processes accessing the /home partition</span>
# strace df <span class="cmt" style="background-color: transparent; color: #000040;"># Trace system calls and signals</span>
# truss df <span class="cmt" style="background-color: transparent; color: #000040;"># same as above on FreeBSD/Solaris/Unixware</span>
</pre>
<h2 id="nice" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Priority</h2>
Change the priority of a running process with <code style="color: #003300;">renice</code>. <b>Negative numbers have a higher priority</b>, the lowest is -20 and "nice" have a positive value.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># renice -5 586 <span class="cmt" style="background-color: transparent; color: #000040;"># Stronger priority</span>
586: old priority 0, new priority -5
</pre>
Start the process with a defined priority with <code style="color: #003300;">nice</code>. Positive is "nice" or weak, negative is strong scheduling priority. Make sure you know if <code style="color: #003300;">/usr/bin/nice</code> or the shell built-in is used (check with <code style="color: #003300;"># which nice</code>).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># nice -n -5 top <span class="cmt" style="background-color: transparent; color: #000040;"># Stronger priority (/usr/bin/nice)</span>
# nice -n 5 top <span class="cmt" style="background-color: transparent; color: #000040;"># Weaker priority (/usr/bin/nice)</span>
# nice +5 top <span class="cmt" style="background-color: transparent; color: #000040;"># tcsh builtin nice (same as above!)</span>
</pre>
While nice changes the CPU scheduler, an other useful command <code style="color: #003300;">ionice</code> will schedule the disk IO. This is very useful for intensive IO application (e.g. compiling). You can select a class (idle - best effort - real time), the man page is short and well explained.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ionice c3 -p123 <span class="cmt" style="background-color: transparent; color: #000040;"># set idle class for pid 123 (Linux only)</span>
# ionice -c2 -n0 firefox <span class="cmt" style="background-color: transparent; color: #000040;"># Run firefox with best effort and high priority</span>
# ionice -c3 -p$$ <span class="cmt" style="background-color: transparent; color: #000040;"># Set the actual shell to idle priority</span>
</pre>
The last command is very useful to compile (or debug) a large project. Every command launched from this shell will have a lover priority. <code style="color: #003300;">$$</code> is your shell pid (try echo $$).<br />FreeBSD uses <code style="color: #003300;">idprio/rtprio</code> (0 = max priority, 31 = most idle):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># idprio 31 make <span class="cmt" style="background-color: transparent; color: #000040;"># compile in the lowest priority</span>
# idprio 31 -1234 <span class="cmt" style="background-color: transparent; color: #000040;"># set PID 1234 with lowest priority</span>
# idprio -t -1234 <span class="cmt" style="background-color: transparent; color: #000040;"># -t removes any real time/idle priority</span>
</pre>
<h2 id="bgfg" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Background/Foreground</h2>
When started from a shell, processes can be brought in the background and back to the foreground with [Ctrl]-[Z] (^Z), <code style="color: #003300;">bg</code> and <code style="color: #003300;">fg</code>. List the processes with <code style="color: #003300;">jobs</code>. When needed detach from the terminal with <code style="color: #003300;">disown</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ping cb.vu > ping.log
^Z <span class="cmt" style="background-color: transparent; color: #000040;"># ping is suspended (stopped) with [Ctrl]-[Z]</span>
# bg <span class="cmt" style="background-color: transparent; color: #000040;"># put in background and continues running</span>
# jobs -l <span class="cmt" style="background-color: transparent; color: #000040;"># List processes in background</span>
[1] - 36232 Running ping cb.vu > ping.log
[2] + 36233 Suspended (tty output) top
# fg %2 <span class="cmt" style="background-color: transparent; color: #000040;"># Bring process 2 back in foreground</span>
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># make <span class="cmt" style="background-color: transparent; color: #000040;"># start a long compile job but need to leave the terminal</span>
^Z <span class="cmt" style="background-color: transparent; color: #000040;"># suspended (stopped) with [Ctrl]-[Z]</span>
# bg <span class="cmt" style="background-color: transparent; color: #000040;"># put in background and continues running</span>
# disown -h %1 <span class="cmt" style="background-color: transparent; color: #000040;"># detatch process from terminal, won't be killed at logout</span>
</pre>
No straight forward way to re-attach the process to a new terminal, try <a href="https://github.com/nelhage/reptyr" style="background-color: transparent; color: #000040;">reptyr</a> (Linux).<br />Use <code style="color: #003300;">nohup</code> to start a process which has to keep running when the shell is closed (immune to hangups).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># nohup ping -i 60 > ping.log &
</pre>
<h2 id="top" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Top</h2>
The program <code style="color: #003300;">top</code> displays running information of processes. See also the program <code style="color: #003300;">htop</code> from htop.sourceforge.net (a more powerful version of top) which runs on Linux and FreeBSD (<code style="color: #003300;">ports/sysutils/htop/</code>). While top is running press the key h for a help overview. Useful keys are:<ul>
<li><b>u [user name]</b> To display only the processes belonging to the user. Use + or blank to see all users</li>
<li><b>k [pid]</b> Kill the process with pid.</li>
<li><b>1</b> To display all processors statistics (Linux only)</li>
<li><b>R</b> Toggle normal/reverse sort.</li>
</ul>
<h2 id="kill" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Signals/Kill</h2>
Terminate or send a signal with <code style="color: #003300;">kill</code> or <code style="color: #003300;">killall</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ping -i 60 cb.vu > ping.log &
[1] 4712
# kill -s TERM 4712 <span class="cmt" style="background-color: transparent; color: #000040;"># same as kill -15 4712</span>
# killall -1 httpd <span class="cmt" style="background-color: transparent; color: #000040;"># Kill HUP processes by exact name</span>
# pkill -9 http <span class="cmt" style="background-color: transparent; color: #000040;"># Kill TERM processes by (part of) name</span>
# pkill -TERM -u www <span class="cmt" style="background-color: transparent; color: #000040;"># Kill TERM processes owned by www</span>
# fuser -k -TERM -m /home <span class="cmt" style="background-color: transparent; color: #000040;"># Kill every process accessing /home (to umount)</span>
</pre>
Important signals are:<ul style="list-style-type: none;">
<li>1 <code style="color: #003300;">HUP</code> (hang up)</li>
<li>2 <code style="color: #003300;">INT</code> (interrupt)</li>
<li>3 <code style="color: #003300;">QUIT</code> (quit)</li>
<li>9 <code style="color: #003300;">KILL</code> (non-catchable, non-ignorable kill)</li>
<li>15 <code style="color: #003300;">TERM</code> (software termination signal)</li>
</ul>
</div>
<div id="filesystem" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">FILE SYSTEM</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#diskinfo" style="background-color: transparent; color: #000040;">Disk info</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#fsboot" style="background-color: transparent; color: #000040;">Boot</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#mountpoints" style="background-color: transparent; color: #000040;">Disk usage</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#filesstat" style="background-color: transparent; color: #000040;">Opened files</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#mountcd" style="background-color: transparent; color: #000040;">Mount/remount</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#mountsmb" style="background-color: transparent; color: #000040;">Mount SMB</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#mountimg" style="background-color: transparent; color: #000040;">Mount image</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#burniso" style="background-color: transparent; color: #000040;">Burn ISO</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#createimg" style="background-color: transparent; color: #000040;">Create image</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#creatememdisk" style="background-color: transparent; color: #000040;">Memory disk</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#diskperf" style="background-color: transparent; color: #000040;">Disk performance</a></div>
<h2 id="permissions" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Permissions</h2>
Change permission and ownership with <code style="color: #003300;">chmod</code> and <code style="color: #003300;">chown</code>. The default umask can be changed for all users in /etc/profile for Linux or /etc/login.conf for FreeBSD. The default umask is usually 022. The umask is subtracted from 777, thus umask 022 results in a permission 0f 755.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">1 --x execute <span class="cmt" style="background-color: transparent; color: #000040;"># Mode 764 = exec/read/write | read/write | read</span>
2 -w- write <span class="cmt" style="background-color: transparent; color: #000040;"># For: |-- Owner --| |- Group-| |Oth|</span>
4 r-- read
ugo=a <span class="cmt" style="background-color: transparent; color: #000040;">u=user, g=group, o=others, a=everyone</span>
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># chmod [OPTION] MODE[,MODE] FILE <span class="cmt" style="background-color: transparent; color: #000040;"># MODE is of the form [ugoa]*([-+=]([rwxXst]))</span>
# chmod 640 /var/log/maillog <span class="cmt" style="background-color: transparent; color: #000040;"># Restrict the log -rw-r-----</span>
# chmod u=rw,g=r,o= /var/log/maillog <span class="cmt" style="background-color: transparent; color: #000040;"># Same as above</span>
# chmod -R o-r /home/* <span class="cmt" style="background-color: transparent; color: #000040;"># Recursive remove other readable for all users</span>
# chmod u+s /path/to/prog <span class="cmt" style="background-color: transparent; color: #000040;"># Set SUID bit on executable (know what you do!)</span>
# find / -perm -u+s -print <span class="cmt" style="background-color: transparent; color: #000040;"># Find all programs with the SUID bit</span>
# chown user:group /path/to/file <span class="cmt" style="background-color: transparent; color: #000040;"># Change the user and group ownership of a file</span>
# chgrp group /path/to/file <span class="cmt" style="background-color: transparent; color: #000040;"># Change the group ownership of a file</span>
# chmod 640 `find ./ -type f -print` <span class="cmt" style="background-color: transparent; color: #000040;"># Change permissions to 640 for all files</span>
# chmod 751 `find ./ -type d -print` <span class="cmt" style="background-color: transparent; color: #000040;"># Change permissions to 751 for all directories</span>
</pre>
<h2 id="diskinfo" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Disk information</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># diskinfo -v /dev/ad2 <span class="cmt" style="background-color: transparent; color: #000040;"># information about disk (sector/size) FreeBSD</span>
# hdparm -I /dev/sda <span class="cmt" style="background-color: transparent; color: #000040;"># information about the IDE/ATA disk (Linux)</span>
# fdisk /dev/ad2 <span class="cmt" style="background-color: transparent; color: #000040;"># Display and manipulate the partition table</span>
# smartctl -a /dev/ad2 <span class="cmt" style="background-color: transparent; color: #000040;"># Display the disk SMART info</span>
</pre>
<h2 id="fsboot" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Boot</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
To boot an old kernel if the new kernel doesn't boot, stop the boot at during the count down.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># unload
# load kernel.old
# boot
</pre>
<h2 id="mountpoints" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
System mount points/Disk usage</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount | column -t <span class="cmt" style="background-color: transparent; color: #000040;"># Show mounted file-systems on the system</span>
# df <span class="cmt" style="background-color: transparent; color: #000040;"># display free disk space and mounted devices</span>
# cat /proc/partitions <span class="cmt" style="background-color: transparent; color: #000040;"># Show all registered partitions (Linux)</span>
</pre>
<h3 id="diskusage" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Disk usage</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># du -sh * <span class="cmt" style="background-color: transparent; color: #000040;"># Directory sizes as listing</span>
# du -csh <span class="cmt" style="background-color: transparent; color: #000040;"># Total directory size of the current directory</span>
# du -ks * | sort -n -r <span class="cmt" style="background-color: transparent; color: #000040;"># Sort everything by size in kilobytes</span>
# ls -lSr <span class="cmt" style="background-color: transparent; color: #000040;"># Show files, biggest last</span>
</pre>
<h2 id="filesstat" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Who has which files opened</h2>
This is useful to find out which file is blocking a partition which has to be unmounted and gives a typical error of:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># umount /home/
umount: unmount of /home <span class="cmt" style="background-color: transparent; color: #000040;"># umount impossible because a file is locking home</span>
failed: Device busy
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD and most Unixes</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># fstat -f /home <span class="cmt" style="background-color: transparent; color: #000040;"># for a mount point</span>
# fstat -p PID <span class="cmt" style="background-color: transparent; color: #000040;"># for an application with PID</span>
# fstat -u user <span class="cmt" style="background-color: transparent; color: #000040;"># for a user name</span>
</pre>
Find opened log file (or other opened files), say for Xorg:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ps ax | grep Xorg | awk '{print $1}'
1252
# fstat -p 1252
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
root Xorg 1252 root / 2 drwxr-xr-x 512 r
root Xorg 1252 text /usr 216016 -rws--x--x 1679848 r
root Xorg 1252 0 /var 212042 -rw-r--r-- 56987 w
</pre>
The file with inum 212042 is the only file in /var:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># find -x /var -inum 212042
/var/log/Xorg.0.log
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
Find opened files on a mount point with <code style="color: #003300;">fuser</code> or <code style="color: #003300;">lsof</code>:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># fuser -m /home <span class="cmt" style="background-color: transparent; color: #000040;"># List processes accessing /home</span>
# lsof /home
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
tcsh 29029 eedcoba cwd DIR 0,18 12288 1048587 /home/eedcoba (guam:/home)
lsof 29140 eedcoba cwd DIR 0,18 12288 1048587 /home/eedcoba (guam:/home)
</pre>
About an application:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">ps ax | grep Xorg | awk '{print $1}'
3324
# lsof -p 3324
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
Xorg 3324 root 0w REG 8,6 56296 12492 /var/log/Xorg.0.log
</pre>
About a single file:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># lsof /var/log/Xorg.0.log
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
Xorg 3324 root 0w REG 8,6 56296 12492 /var/log/Xorg.0.log
</pre>
<h2 id="mountcd" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Mount/remount a file system</h2>
For example the cdrom. If listed in /etc/fstab:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount /cdrom</pre>
Or find the device in /dev/ or with dmesg<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -v -t cd9660 /dev/cd0c /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># cdrom</span>
# mount_cd9660 /dev/wcd0c /cdrom <span class="cmt" style="background-color: transparent; color: #000040;"># other method</span>
# mount -v -t msdos /dev/fd0c /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># floppy</span>
</pre>
Entry in /etc/fstab:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># Device Mountpoint FStype Options Dump Pass#
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
</pre>
To let users do it:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sysctl vfs.usermount=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Or insert the line "vfs.usermount=1" in /etc/sysctl.conf</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -t auto /dev/cdrom /mnt/cdrom <span class="cmt" style="background-color: transparent; color: #000040;"># typical cdrom mount command</span>
# mount /dev/hdc -t iso9660 -r /cdrom <span class="cmt" style="background-color: transparent; color: #000040;"># typical IDE</span>
# mount /dev/scd0 -t iso9660 -r /cdrom <span class="cmt" style="background-color: transparent; color: #000040;"># typical SCSI cdrom</span>
# mount /dev/sdc0 -t ntfs-3g /windows <span class="cmt" style="background-color: transparent; color: #000040;"># typical SCSI</span>
</pre>
Entry in /etc/fstab:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">/dev/cdrom /media/cdrom subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec 0 0</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Mount a FreeBSD partition with Linux</h4>
Find the partition number containing with fdisk, this is usually the root partition, but it could be an other BSD slice too. If the FreeBSD has many slices, they are the one not listed in the fdisk table, but visible in /dev/sda* or /dev/hda*.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># fdisk /dev/sda <span class="cmt" style="background-color: transparent; color: #000040;"># Find the FreeBSD partition</span>
/dev/sda3 * 5357 7905 20474842+ a5 FreeBSD
# mount -t ufs -o ufstype=ufs2,ro /dev/sda3 /mnt
/dev/sda10 = /tmp; /dev/sda11 /usr <span class="cmt" style="background-color: transparent; color: #000040;"># The other slices</span>
</pre>
<h3 id="remount" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Remount</h3>
Remount a device without unmounting it. Necessary for fsck for example<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -o remount,ro / <span class="cmt" style="background-color: transparent; color: #000040;"># Linux</span>
# mount -o ro -u / <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD</span>
</pre>
Copy the raw data from a cdrom into an iso image (default 512 blocksize might cause problems):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/cd0c of=file.iso bs=2048</pre>
<h3 id="virtualbox" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Virtualbox</h3>
Allow a share on the host:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># VBoxManage sharedfolder add "GuestName" --name "share" --hostpath "C:\hostshare"</pre>
Mount share on guest (linux, FreeBSD)<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sudo mount -t vboxsf share /home/vboxshare <span class="cmt" style="background-color: transparent; color: #000040;"># -o uid=1000,gid=1000 (as appropriate)</span>
share /home/colin/share vboxsf defaults,uid=colin 0 0 <span class="cmt" style="background-color: transparent; color: #000040;"># fstab entry</span>
</pre>
<h3 id="osxdisk" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
OSX</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># diskutil list <span class="cmt" style="background-color: transparent; color: #000040;"># List the partitions of a disk</span>
# diskutil unmountDisk /dev/disk1 <span class="cmt" style="background-color: transparent; color: #000040;"># Unmount an entire disk (all volumes)</span>
# chflags hidden ~/Documents/folder <span class="cmt" style="background-color: transparent; color: #000040;"># Hide folder (reverse with unhidden)</span>
</pre>
<h2 id="addswap" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Add swap on-the-fly</h2>
Suppose you need more swap (right now), say a 2GB file /swap2gb (Linux only).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/zero of=/swap2gb bs=1024k count=2000
# mkswap /swap2gb <span class="cmt" style="background-color: transparent; color: #000040;"># create the swap area</span>
# swapon /swap2gb <span class="cmt" style="background-color: transparent; color: #000040;"># activate the swap. It now in use</span>
# swapoff /swap2gb <span class="cmt" style="background-color: transparent; color: #000040;"># when done deactivate the swap</span>
# rm /swap2gb
</pre>
<h2 id="mountsmb" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Mount an SMB share</h2>
Suppose we want to access the SMB share myshare on the computer smbserver, the address as typed on a Windows PC is \\smbserver\myshare\. We mount on /mnt/smbshare. Warning> cifs wants an IP or DNS name, not a Windows name.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux/OSX</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># smbclient -U user -I 192.168.16.229 -L //smbshare/ <span class="cmt" style="background-color: transparent; color: #000040;"># List the shares</span>
# mount -t smbfs -o username=winuser //smbserver/myshare /mnt/smbshare
# mount -t cifs -o username=winuser,password=winpwd //192.168.16.229/myshare /mnt/share
</pre>
Mound Samba share through ssh tunnel<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -C -f -N -p 20022 -L 445:127.0.0.1:445 me@server <span class="cmt" style="background-color: transparent; color: #000040;"># connect on 20022, tunnel 445</span>
# mount -t smbfs //colin@localhost/colin ~/mnt
# mount_smbfs //colin:mypassword@127.0.0.1/private /Volumes/private <span class="cmt" style="background-color: transparent; color: #000040;"># I use this on OSX + ssh</span>
</pre>
Additionally with the package mount.cifs it is possible to store the credentials in a file, for example <code style="color: #003300;">/home/user/.smb</code>:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">username=winuser
password=winpwd
</pre>
And mount as follow:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -t cifs -o credentials=/home/user/.smb //192.168.16.229/myshare /mnt/smbshare</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
Use -I to give the IP (or DNS name); smbserver is the Windows name.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># smbutil view -I 192.168.16.229 //winuser@smbserver <span class="cmt" style="background-color: transparent; color: #000040;"># List the shares</span>
# mount_smbfs -I 192.168.16.229 //winuser@smbserver/myshare /mnt/smbshare
</pre>
<h2 id="mountimg" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Mount an image</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># hdiutil mount image.iso <span class="cmt" style="background-color: transparent; color: #000040;"># OS X</span></pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux loop-back</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -t iso9660 -o loop file.iso /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># Mount a CD image</span>
# mount -t ext3 -o loop file.img /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># Mount an image with ext3 fs</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
With memory device (do # kldload md.ko if necessary):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mdconfig -a -t vnode -f file.iso -u 0
# mount -t cd9660 /dev/md0 /mnt
# umount /mnt; mdconfig -d -u 0 <span class="cmt" style="background-color: transparent; color: #000040;"># Cleanup the md device</span>
</pre>
Or with virtual node:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># vnconfig /dev/vn0c file.iso; mount -t cd9660 /dev/vn0c /mnt
# umount /mnt; vnconfig -u /dev/vn0c <span class="cmt" style="background-color: transparent; color: #000040;"># Cleanup the vn device</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Solaris and FreeBSD</h3>
with loop-back file interface or lofi:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># lofiadm -a file.iso
# mount -F hsfs -o ro /dev/lofi/1 /mnt
# umount /mnt; lofiadm -d /dev/lofi/1 <span class="cmt" style="background-color: transparent; color: #000040;"># Cleanup the lofi device</span>
</pre>
<h2 id="burniso" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Create and burn an ISO image</h2>
This will copy the cd or DVD sector for sector. Without <code style="color: #003300;">conv=notrunc</code>, the image will be smaller if there is less content on the cd. See below and the <a class="xref" href="http://cb.vu/unixtoolbox.xhtml#dd" style="background-color: transparent; color: #000040;">dd examples</a>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/hdc of=/tmp/mycd.iso bs=2048 conv=notrunc</pre>
Use mkisofs to create a CD/DVD image from files in a directory. To overcome the file names restrictions: -r enables the Rock Ridge extensions common to UNIX systems, -J enables Joliet extensions used by Microsoft systems. -L allows ISO9660 filenames to begin with a period.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mkisofs -J -L -r -V TITLE -o imagefile.iso /path/to/dir
# hdiutil makehybrid -iso -joliet -o dir.iso dir/ <span class="cmt" style="background-color: transparent; color: #000040;"># OS X</span></pre>
On FreeBSD, mkisofs is found in the ports in sysutils/cdrtools.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Burn a CD/DVD ISO image</h3>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
FreeBSD</h4>
FreeBSD does not enable DMA on ATAPI drives by default. DMA is enabled with the sysctl command and the arguments below, or with /boot/loader.conf with the following entries:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">hw.ata.ata_dma="1"
hw.ata.atapi_dma="1"
</pre>
Use <code style="color: #003300;">burncd</code> with an ATAPI device (<code style="color: #003300;">burncd</code> is part of the base system) and <code style="color: #003300;">cdrecord</code> (in sysutils/cdrtools) with a SCSI drive.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># burncd -f /dev/acd0 data imagefile.iso fixate <span class="cmt" style="background-color: transparent; color: #000040;"># For ATAPI drive</span>
# cdrecord -scanbus <span class="cmt" style="background-color: transparent; color: #000040;"># To find the burner device (like 1,0,0)</span>
# cdrecord dev=1,0,0 imagefile.iso
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Linux</h4>
Also use <code style="color: #003300;">cdrecord</code> with Linux as described above. Additionally it is possible to use the native ATAPI interface which is found with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cdrecord dev=ATAPI -scanbus</pre>
And burn the CD/DVD as above.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
dvd+rw-tools</h4>
The <a href="http://fy.chalmers.se/~appro/linux/DVD+RW/" style="background-color: transparent; color: #000040;">dvd+rw-tools</a> package (FreeBSD: ports/sysutils/dvd+rw-tools) can do it all and includes <code style="color: #003300;">growisofs</code> to burn CDs or DVDs. The examples refer to the dvd device as <code style="color: #003300;">/dev/dvd</code> which could be a symlink to <code style="color: #003300;">/dev/scd0</code> (typical scsi on Linux) or <code style="color: #003300;">/dev/cd0</code> (typical FreeBSD) or <code style="color: #003300;">/dev/rcd0c</code> (typical NetBSD/OpenBSD character SCSI) or <code style="color: #003300;">/dev/rdsk/c0t1d0s2</code> (Solaris example of a character SCSI/ATAPI CD-ROM device). There is a nice documentation with examples on the <a href="http://www.freebsd.org/handbook/creating-dvds.html" style="background-color: transparent; color: #000040;">FreeBSD handbook chapter 18.7</a>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"> <span class="cmt" style="background-color: transparent; color: #000040;"># -dvd-compat closes the disk</span>
# growisofs -dvd-compat -Z /dev/dvd=imagefile.iso <span class="cmt" style="background-color: transparent; color: #000040;"># Burn existing iso image</span>
# growisofs -dvd-compat -Z /dev/dvd -J -R /p/to/data <span class="cmt" style="background-color: transparent; color: #000040;"># Burn directly</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Convert a Nero .nrg file to .iso</h3>
Nero simply adds a 300Kb header to a normal iso image. This can be trimmed with dd.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd bs=1k if=imagefile.nrg of=imagefile.iso skip=300</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Convert a bin/cue image to .iso</h3>
The little <a href="http://freshmeat.net/projects/bchunk/" style="background-color: transparent; color: #000040;"><code style="color: #003300;">bchunk</code> program</a> can do this. It is in the FreeBSD ports in sysutils/bchunk.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># bchunk imagefile.bin imagefile.cue imagefile.iso
</pre>
<h2 id="createimg" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Create a file based image</h2>
For example a partition of 1GB using the file /usr/vdisk.img. Here we use the vnode 0, but it could also be 1.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/random of=/usr/vdisk.img bs=1K count=1M
# mdconfig -a -t vnode -f /usr/vdisk.img -u 0 <span class="cmt" style="background-color: transparent; color: #000040;"># Creates device /dev/md1</span>
# bsdlabel -w /dev/md0
# newfs /dev/md0c
# mount /dev/md0c /mnt
# umount /mnt; mdconfig -d -u 0; rm /usr/vdisk.img <span class="cmt" style="background-color: transparent; color: #000040;"># Cleanup the md device</span>
</pre>
The file based image can be automatically mounted during boot with an entry in /etc/rc.conf and /etc/fstab. Test your setup with <code style="color: #003300;"># /etc/rc.d/mdconfig start</code> (first delete the md0 device with <code style="color: #003300;"># mdconfig -d -u 0</code>).<br />Note however that this automatic setup will only work if the file image is NOT on the root partition. The reason is that the /etc/rc.d/mdconfig script is executed very early during boot and the root partition is still read-only. Images located outside the root partition will be mounted later with the script /etc/rc.d/mdconfig2.<br />/boot/loader.conf:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">md_load="YES"</pre>
/etc/rc.conf:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mdconfig_md0="-t vnode -f /usr/vdisk.img" <span class="cmt" style="background-color: transparent; color: #000040;"># /usr is not on the root partition</span></pre>
/etc/fstab: (The 0 0 at the end is important, it tell fsck to ignore this device, as is does not exist yet)<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">/dev/md0 /usr/vdisk ufs rw 0 0</pre>
It is also possible to increase the size of the image afterward, say for example 300 MB larger.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># umount /mnt; mdconfig -d -u 0
# dd if=/dev/zero bs=1m count=300 >> /usr/vdisk.img
# mdconfig -a -t vnode -f /usr/vdisk.img -u 0
# growfs /dev/md0
# mount /dev/md0c /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># File partition is now 300 MB larger</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/zero of=/usr/vdisk.img bs=1024k count=1024
# mkfs.ext3 /usr/vdisk.img
# mount -o loop /usr/vdisk.img /mnt
# umount /mnt; rm /usr/vdisk.img <span class="cmt" style="background-color: transparent; color: #000040;"># Cleanup</span>
</pre>
<h3 id="losetup" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux with losetup</h3>
<code style="color: #003300;">/dev/zero</code> is much faster than <code style="color: #003300;">urandom</code>, but less secure for encryption.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/urandom of=/usr/vdisk.img bs=1024k count=1024
# losetup /dev/loop0 /usr/vdisk.img <span class="cmt" style="background-color: transparent; color: #000040;"># Creates and associates /dev/loop0</span>
# mkfs.ext3 /dev/loop0
# mount /dev/loop0 /mnt
# losetup -a <span class="cmt" style="background-color: transparent; color: #000040;"># Check used loops</span>
# umount /mnt
# losetup -d /dev/loop0 <span class="cmt" style="background-color: transparent; color: #000040;"># Detach</span>
# rm /usr/vdisk.img
</pre>
<h2 id="creatememdisk" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Create a memory file system</h2>
A memory based file system is very fast for heavy IO application. How to create a 64 MB partition mounted on /memdisk:<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount_mfs -o rw -s 64M md /memdisk
# umount /memdisk; mdconfig -d -u 0 <span class="cmt" style="background-color: transparent; color: #000040;"># Cleanup the md device</span>
md /memdisk mfs rw,-s64M 0 0 <span class="cmt" style="background-color: transparent; color: #000040;"># /etc/fstab entry</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mount -t tmpfs -osize=64m tmpfs /memdisk
</pre>
<h2 id="diskperf" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Disk performance</h2>
Read and write a 1 GB file on partition ad4s3c (/home)<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># time dd if=/dev/ad4s3c of=/dev/null bs=1024k count=1000
# time dd if=/dev/zero bs=1024k count=1000 of=/home/1Gb.file
# hdparm -tT /dev/hda <span class="cmt" style="background-color: transparent; color: #000040;"># Linux only</span>
</pre>
</div>
<div id="network" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">NETWORK</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#routing" style="background-color: transparent; color: #000040;">Routing</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#secondip" style="background-color: transparent; color: #000040;">Additional IP</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#changemac" style="background-color: transparent; color: #000040;">Change MAC</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#ports" style="background-color: transparent; color: #000040;">Ports</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#firewall" style="background-color: transparent; color: #000040;">Firewall</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#ipforward" style="background-color: transparent; color: #000040;">IP Forward</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#nat" style="background-color: transparent; color: #000040;">NAT</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#dns" style="background-color: transparent; color: #000040;">DNS</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#dhcp" style="background-color: transparent; color: #000040;">DHCP</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#traffic" style="background-color: transparent; color: #000040;">Traffic</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#trafficctrl" style="background-color: transparent; color: #000040;">QoS</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#nis" style="background-color: transparent; color: #000040;">NIS</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#netcat" style="background-color: transparent; color: #000040;">Netcat</a></div>
<h2 id="netdebug" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Debugging (See also <a class="xref" href="http://cb.vu/unixtoolbox.xhtml#traffic" style="background-color: transparent; color: #000040;">Traffic analysis)</a></h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ethtool eth0 <span class="cmt" style="background-color: transparent; color: #000040;"># Show the ethernet status (replaces mii-diag)</span>
# ethtool -s eth0 speed 100 duplex full <span class="cmt" style="background-color: transparent; color: #000040;"># Force 100Mbit Full duplex</span>
# ethtool -s eth0 autoneg off <span class="cmt" style="background-color: transparent; color: #000040;"># Disable auto negotiation</span>
# ethtool -p eth1 <span class="cmt" style="background-color: transparent; color: #000040;"># Blink the ethernet led - very useful when supported</span>
# ip link show <span class="cmt" style="background-color: transparent; color: #000040;"># Display all interfaces on Linux (similar to ifconfig)</span>
# ip link set eth0 up <span class="cmt" style="background-color: transparent; color: #000040;"># Bring device up (or down). Same as "ifconfig eth0 up"</span>
# ip addr show <span class="cmt" style="background-color: transparent; color: #000040;"># Display all IP addresses on Linux (similar to ifconfig)</span>
# ip neigh show <span class="cmt" style="background-color: transparent; color: #000040;"># Similar to arp -a</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Other OSes</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ifconfig fxp0 <span class="cmt" style="background-color: transparent; color: #000040;"># Check the "media" field on FreeBSD</span>
# arp -a <span class="cmt" style="background-color: transparent; color: #000040;"># Check the router (or host) ARP entry (all OS)</span>
# ping cb.vu <span class="cmt" style="background-color: transparent; color: #000040;"># The first thing to try...</span>
# traceroute cb.vu <span class="cmt" style="background-color: transparent; color: #000040;"># Print the route path to destination</span>
# ifconfig fxp0 media 100baseTX mediaopt full-duplex <span class="cmt" style="background-color: transparent; color: #000040;"># 100Mbit full duplex (FreeBSD)</span>
# netstat -s <span class="cmt" style="background-color: transparent; color: #000040;"># System-wide statistics for each network protocol</span>
</pre>
Additional commands which are not always installed per default but easy to find:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># arping 192.168.16.254 <span class="cmt" style="background-color: transparent; color: #000040;"># Ping on ethernet layer</span>
# tcptraceroute -f 5 cb.vu <span class="cmt" style="background-color: transparent; color: #000040;"># uses tcp instead of icmp to trace through firewalls</span>
</pre>
<h2 id="routing" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Routing</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Print routing table</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># route -n <span class="cmt" style="background-color: transparent; color: #000040;"># Linux or use "ip route"</span>
# netstat -rn <span class="cmt" style="background-color: transparent; color: #000040;"># Linux, BSD and UNIX</span>
# route print <span class="cmt" style="background-color: transparent; color: #000040;"># Windows</span>
</pre>
<h3 id="addroute" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Add and delete a route</h3>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
FreeBSD</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># route add 212.117.0.0/16 192.168.1.1
# route delete 212.117.0.0/16
# route add default 192.168.1.1
</pre>
Add the route permanently in /etc/rc.conf<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">static_routes="myroute"
route_myroute="-net 212.117.0.0/16 192.168.1.1"
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Linux</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># route add -net 192.168.20.0 netmask 255.255.255.0 gw 192.168.16.254
# ip route add 192.168.20.0/24 via 192.168.16.254 <span class="cmt" style="background-color: transparent; color: #000040;"># same as above with ip route</span>
# route add -net 192.168.20.0 netmask 255.255.255.0 dev eth0
# route add default gw 192.168.51.254
# ip route add default via 192.168.51.254 dev eth0 <span class="cmt" style="background-color: transparent; color: #000040;"># same as above with ip route</span>
# route delete -net 192.168.20.0 netmask 255.255.255.0
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Solaris</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># route add -net 192.168.20.0 -netmask 255.255.255.0 192.168.16.254
# route add default 192.168.51.254 1 <span class="cmt" style="background-color: transparent; color: #000040;"># 1 = hops to the next gateway</span>
# route change default 192.168.50.254 1
</pre>
Permanent entries are set in entry in <code style="color: #003300;">/etc/defaultrouter</code>.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Windows</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># Route add 192.168.50.0 mask 255.255.255.0 192.168.51.253
# Route add 0.0.0.0 mask 0.0.0.0 192.168.51.254</pre>
Use add -p to make the route persistent.<h2 id="secondip" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Configure additional IP addresses</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ifconfig eth0 192.168.50.254 netmask 255.255.255.0 <span class="cmt" style="background-color: transparent; color: #000040;"># First IP</span>
# ifconfig eth0:0 192.168.51.254 netmask 255.255.255.0 <span class="cmt" style="background-color: transparent; color: #000040;"># Second IP</span>
# ip addr add 192.168.50.254/24 dev eth0 <span class="cmt" style="background-color: transparent; color: #000040;"># Equivalent ip commands</span>
# ip addr add 192.168.51.254/24 dev eth0 label eth0:1
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ifconfig fxp0 inet 192.168.50.254/24 <span class="cmt" style="background-color: transparent; color: #000040;"># First IP</span>
# ifconfig fxp0 alias 192.168.51.254 netmask 255.255.255.0 <span class="cmt" style="background-color: transparent; color: #000040;"># Second IP</span>
# ifconfig fxp0 -alias 192.168.51.254 <span class="cmt" style="background-color: transparent; color: #000040;"># Remove second IP alias</span>
</pre>
Permanent entries in /etc/rc.conf<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">ifconfig_fxp0="inet 192.168.50.254 netmask 255.255.255.0"
ifconfig_fxp0_alias0="192.168.51.254 netmask 255.255.255.0"
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Solaris</h3>
Check the settings with <code style="color: #003300;">ifconfig -a</code><pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ifconfig hme0 plumb <span class="cmt" style="background-color: transparent; color: #000040;"># Enable the network card</span>
# ifconfig hme0 192.168.50.254 netmask 255.255.255.0 up <span class="cmt" style="background-color: transparent; color: #000040;"># First IP</span>
# ifconfig hme0:1 192.168.51.254 netmask 255.255.255.0 up <span class="cmt" style="background-color: transparent; color: #000040;"># Second IP</span>
</pre>
<h2 id="changemac" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Change MAC address</h2>
Normally you have to bring the interface down before the change. Don't tell me why you want to change the MAC address...<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ifconfig eth0 down
# ifconfig eth0 hw ether 00:01:02:03:04:05 <span class="cmt" style="background-color: transparent; color: #000040;"># Linux</span>
# ifconfig fxp0 link 00:01:02:03:04:05 <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD</span>
# ifconfig hme0 ether 00:01:02:03:04:05 <span class="cmt" style="background-color: transparent; color: #000040;"># Solaris</span>
# sudo ifconfig en0 ether 00:01:02:03:04:05 <span class="cmt" style="background-color: transparent; color: #000040;"># OS X Tiger, Snow Leopard LAN*</span>
# sudo ifconfig en0 lladdr 00:01:02:03:04:05 <span class="cmt" style="background-color: transparent; color: #000040;"># OS X Leopard</span>
</pre>
*Typical wireless interface is <code style="color: #003300;">en1</code> and needs do disassociate from any network first (<a href="http://osxdaily.com/2008/01/17/how-to-spoof-your-mac-address-in-mac-os-x/" style="background-color: transparent; color: #000040;">osxdaily howto</a>).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># echo "alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'"\
>> ~/.bash_profile <span class="cmt" style="background-color: transparent; color: #000040;"># or symlink to /usr/sbin</span>
# airport -z <span class="cmt" style="background-color: transparent; color: #000040;"># Disassociate from wireless networks</span>
# airport -I <span class="cmt" style="background-color: transparent; color: #000040;"># Get info from wireless network</span></pre>
Many tools exist for Windows. For example <a href="http://ntsecurity.nu/toolbox/etherchange/" style="background-color: transparent; color: #000040;">etherchange</a>. Or look for "Mac Makeup", "smac".<h2 id="ports" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Ports in use</h2>
Listening open ports:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># netstat -an | grep LISTEN
# lsof -i <span class="cmt" style="background-color: transparent; color: #000040;"># Linux list all Internet connections</span>
# socklist <span class="cmt" style="background-color: transparent; color: #000040;"># Linux display list of open sockets</span>
# sockstat -4 <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD application listing</span>
# netstat -anp --udp --tcp | grep LISTEN <span class="cmt" style="background-color: transparent; color: #000040;"># Linux</span>
# netstat -tup <span class="cmt" style="background-color: transparent; color: #000040;"># List active connections to/from system (Linux)</span>
# netstat -tupl <span class="cmt" style="background-color: transparent; color: #000040;"># List listening ports from system (Linux)</span>
# netstat -ano <span class="cmt" style="background-color: transparent; color: #000040;"># Windows</span>
</pre>
<h2 id="firewall" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Firewall</h2>
Check if a firewall is running (typical configuration only):<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># iptables -L -n -v <span class="cmt" style="background-color: transparent; color: #000040;"># For status</span>
Open the iptables firewall
# iptables -P INPUT ACCEPT <span class="cmt" style="background-color: transparent; color: #000040;"># Open everything</span>
# iptables -P FORWARD ACCEPT
# iptables -P OUTPUT ACCEPT
# iptables -Z <span class="cmt" style="background-color: transparent; color: #000040;"># Zero the packet and byte counters in all chains</span>
# iptables -F <span class="cmt" style="background-color: transparent; color: #000040;"># Flush all chains</span>
# iptables -X <span class="cmt" style="background-color: transparent; color: #000040;"># Delete all chains</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ipfw show <span class="cmt" style="background-color: transparent; color: #000040;"># For status</span>
# ipfw list 65535 <span class="cmt" style="background-color: transparent; color: #000040;"># if answer is "65535 deny ip from any to any" the fw is disabled</span>
# sysctl net.inet.ip.fw.enable=0 <span class="cmt" style="background-color: transparent; color: #000040;"># Disable</span>
# sysctl net.inet.ip.fw.enable=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Enable</span>
</pre>
<h2 id="ipforward" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
IP Forward for routing</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
Check and then enable IP forward with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat /proc/sys/net/ipv4/ip_forward <span class="cmt" style="background-color: transparent; color: #000040;"># Check IP forward 0=off, 1=on</span>
# echo 1 > /proc/sys/net/ipv4/ip_forward
</pre>
or edit /etc/sysctl.conf with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">net.ipv4.ip_forward = 1</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
Check and enable with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sysctl net.inet.ip.forwarding <span class="cmt" style="background-color: transparent; color: #000040;"># Check IP forward 0=off, 1=on</span>
# sysctl net.inet.ip.forwarding=1
# sysctl net.inet.ip.fastforwarding=1 <span class="cmt" style="background-color: transparent; color: #000040;"># For dedicated router or firewall</span>
Permanent with entry in /etc/rc.conf:
gateway_enable="YES" <span class="cmt" style="background-color: transparent; color: #000040;"># Set to YES if this host will be a gateway.</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Solaris</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ndd -set /dev/ip ip_forwarding 1 <span class="cmt" style="background-color: transparent; color: #000040;"># Set IP forward 0=off, 1=on</span>
</pre>
<h2 id="nat" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
NAT Network Address Translation</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE <span class="cmt" style="background-color: transparent; color: #000040;"># to activate NAT</span>
# iptables -t nat -A PREROUTING -p tcp -d 78.31.70.238 --dport 20022 -j DNAT \
--to 192.168.16.44:22 <span class="cmt" style="background-color: transparent; color: #000040;"># Port forward 20022 to internal IP port ssh</span>
# iptables -t nat -A PREROUTING -p tcp -d 78.31.70.238 --dport 993:995 -j DNAT \
--to 192.168.16.254:993-995 <span class="cmt" style="background-color: transparent; color: #000040;"># Port forward of range 993-995</span>
# ip route flush cache
# iptables -L -t nat <span class="cmt" style="background-color: transparent; color: #000040;"># Check NAT status</span>
</pre>
Delete the port forward with -D instead of -A. The program <a href="http://tweegy.nl/projects/netstat-nat/" style="background-color: transparent; color: #000040;">netstat-nat</a> is very useful to track connections (it uses <code style="color: #003300;">/proc/net/ip_conntrack</code> or<code style="color: #003300;">/proc/net/nf_conntrack</code>).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># netstat-nat -n <span class="cmt" style="background-color: transparent; color: #000040;"># show all connections with IPs</span></pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># natd -s -m -u -dynamic -f /etc/natd.conf -n fxp0
Or edit /etc/rc.conf with:
firewall_enable="YES" <span class="cmt" style="background-color: transparent; color: #000040;"># Set to YES to enable firewall functionality</span>
firewall_type="open" <span class="cmt" style="background-color: transparent; color: #000040;"># Firewall type (see /etc/rc.firewall)</span>
natd_enable="YES" <span class="cmt" style="background-color: transparent; color: #000040;"># Enable natd (if firewall_enable == YES).</span>
natd_interface="tun0" <span class="cmt" style="background-color: transparent; color: #000040;"># Public interface or IP address to use.</span>
natd_flags="-s -m -u -dynamic -f /etc/natd.conf"
</pre>
Port forward with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat /etc/natd.conf
same_ports yes
use_sockets yes
unregistered_only
# redirect_port tcp insideIP:2300-2399 3300-3399 <span class="cmt" style="background-color: transparent; color: #000040;"># port range</span>
redirect_port udp 192.168.51.103:7777 7777
</pre>
<h2 id="dns" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
DNS</h2>
On Unix the DNS entries are valid for all interfaces and are stored in /etc/resolv.conf. The domain to which the host belongs is also stored in this file. A minimal configuration is:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">nameserver 78.31.70.238
search sleepyowl.net intern.lab
domain sleepyowl.net
</pre>
Check the system domain name with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># hostname -d <span class="cmt" style="background-color: transparent; color: #000040;"># Same as dnsdomainname</span></pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Windows</h3>
On Windows the DNS are configured per interface. To display the configured DNS and to flush the DNS cache use:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ipconfig /? <span class="cmt" style="background-color: transparent; color: #000040;"># Display help</span>
# ipconfig /all <span class="cmt" style="background-color: transparent; color: #000040;"># See all information including DNS</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Flush DNS</h3>
Flush the OS DNS cache, some application using their own cache (e.g. Firefox) and will be unaffected.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># /etc/init.d/nscd restart <span class="cmt" style="background-color: transparent; color: #000040;"># Restart nscd if used - Linux/BSD/Solaris</span>
# lookupd -flushcache <span class="cmt" style="background-color: transparent; color: #000040;"># OS X Tiger</span>
# dscacheutil -flushcache <span class="cmt" style="background-color: transparent; color: #000040;"># OS X Leopard and newer</span>
# ipconfig /flushdns <span class="cmt" style="background-color: transparent; color: #000040;"># Windows</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Forward queries</h3>
Dig is you friend to test the DNS settings. For example the public DNS server <code style="color: #003300;">213.133.105.2 ns.second-ns.de</code> can be used for testing. See from which server the client receives the answer (simplified answer).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dig sleepyowl.net
sleepyowl.net. 600 IN A 78.31.70.238
;; SERVER: 192.168.51.254#53(192.168.51.254)
</pre>
The router 192.168.51.254 answered and the response is the A entry. Any entry can be queried and the DNS server can be selected with @:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dig MX google.com
# dig @127.0.0.1 NS sun.com <span class="cmt" style="background-color: transparent; color: #000040;"># To test the local server</span>
# dig @204.97.212.10 NS MX heise.de <span class="cmt" style="background-color: transparent; color: #000040;"># Query an external server</span>
# dig AXFR @ns1.xname.org cb.vu <span class="cmt" style="background-color: transparent; color: #000040;"># Get the full zone (zone transfer)</span>
</pre>
The program host is also powerful.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># host -t MX cb.vu <span class="cmt" style="background-color: transparent; color: #000040;"># Get the mail MX entry</span>
# host -t NS -T sun.com <span class="cmt" style="background-color: transparent; color: #000040;"># Get the NS record over a TCP connection</span>
# host -a sleepyowl.net <span class="cmt" style="background-color: transparent; color: #000040;"># Get everything</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Reverse queries</h3>
Find the name belonging to an IP address (in-addr.arpa.). This can be done with <code style="color: #003300;">dig</code>, <code style="color: #003300;">host</code> and <code style="color: #003300;">nslookup</code>:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dig -x 78.31.70.238
# host 78.31.70.238
# nslookup 78.31.70.238
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
/etc/hosts</h3>
Single hosts can be configured in the file /etc/hosts instead of running <code style="color: #003300;">named</code> locally to resolve the hostname queries. The format is simple, for example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">78.31.70.238 sleepyowl.net sleepyowl</pre>
The priority between hosts and a dns query, that is the name resolution order, can be configured in <code style="color: #003300;">/etc/nsswitch.conf</code> AND /etc/host.conf. The file also exists on Windows, it is usually in:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">C:\WINDOWS\SYSTEM32\DRIVERS\ETC</pre>
<h2 id="dhcp" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
DHCP</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
Some distributions (SuSE) use dhcpcd as client. The default interface is eth0.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dhcpcd -n eth0 <span class="cmt" style="background-color: transparent; color: #000040;"># Trigger a renew (does not always work)</span>
# dhcpcd -k eth0 <span class="cmt" style="background-color: transparent; color: #000040;"># release and shutdown</span>
</pre>
The lease with the full information is stored in:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">/var/lib/dhcpcd/dhcpcd-eth0.info</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
FreeBSD (and Debian) uses dhclient. To configure an interface (for example bge0) run:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dhclient bge0</pre>
The lease with the full information is stored in:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">/var/db/dhclient.leases.bge0</pre>
Use<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">/etc/dhclient.conf</pre>
to prepend options or force different options:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat /etc/dhclient.conf
interface "rl0" {
prepend domain-name-servers 127.0.0.1;
default domain-name "sleepyowl.net";
supersede domain-name "sleepyowl.net";
}
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Windows</h3>
The dhcp lease can be renewed with <code style="color: #003300;">ipconfig</code>:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ipconfig /renew <span class="cmt" style="background-color: transparent; color: #000040;"># renew all adapters</span>
# ipconfig /renew LAN <span class="cmt" style="background-color: transparent; color: #000040;"># renew the adapter named "LAN"</span>
# ipconfig /release WLAN <span class="cmt" style="background-color: transparent; color: #000040;"># release the adapter named "WLAN"</span>
</pre>
Yes it is a good idea to rename you adapter with simple names!<h2 id="traffic" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Traffic analysis</h2>
<a href="http://people.suug.ch/~tgr/bmon/" style="background-color: transparent; color: #000040;">Bmon</a> is a small console bandwidth monitor and can display the flow on different interfaces.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Sniff with tcpdump</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tcpdump -nl -i bge0 not port ssh and src \(192.168.16.121 or 192.168.16.54\)
# tcpdump -n -i eth1 net 192.168.16.121 <span class="cmt" style="background-color: transparent; color: #000040;"># select to/from a single IP</span>
# tcpdump -n -i eth1 net 192.168.16.0/24 <span class="cmt" style="background-color: transparent; color: #000040;"># select traffic to/from a network</span>
# tcpdump -l > dump && tail -f dump <span class="cmt" style="background-color: transparent; color: #000040;"># Buffered output</span>
# tcpdump -i rl0 -w traffic.rl0 <span class="cmt" style="background-color: transparent; color: #000040;"># Write traffic headers in binary file</span>
# tcpdump -i rl0 -s 0 -w traffic.rl0 <span class="cmt" style="background-color: transparent; color: #000040;"># Write traffic + payload in binary file</span>
# tcpdump -r traffic.rl0 <span class="cmt" style="background-color: transparent; color: #000040;"># Read from file (also for ethereal</span>
# tcpdump port 80 <span class="cmt" style="background-color: transparent; color: #000040;"># The two classic commands</span>
# tcpdump host google.com
# tcpdump -i eth0 -X port \(110 or 143\) <span class="cmt" style="background-color: transparent; color: #000040;"># Check if pop or imap is secure</span>
# tcpdump -n -i eth0 icmp <span class="cmt" style="background-color: transparent; color: #000040;"># Only catch pings</span>
# tcpdump -i eth0 -s 0 -A port 80 | grep GET <span class="cmt" style="background-color: transparent; color: #000040;"># -s 0 for full packet -A for ASCII</span>
</pre>
Additional important options:<ul style="list-style-type: none;">
<li><code style="color: #003300;">-A</code> Print each packets in clear text (without header)</li>
<li><code style="color: #003300;">-X</code> Print packets in hex and ASCII</li>
<li><code style="color: #003300;">-l</code> Make stdout line buffered</li>
<li><code style="color: #003300;">-D</code> Print all interfaces available</li>
</ul>
On Windows use windump from <a href="http://www.winpcap.org/" rel="nofollow" style="background-color: transparent; color: #000040;">www.winpcap.org</a>. Use windump -D to list the interfaces.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Scan with nmap</h3>
<a href="http://insecure.org/nmap/" rel="nofollow" style="background-color: transparent; color: #000040;">Nmap</a> is a port scanner with OS detection, it is usually installed on most distributions and is also available for Windows. If you don't scan your servers, hackers do it for you...<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># nmap cb.vu <span class="cmt" style="background-color: transparent; color: #000040;"># scans all reserved TCP ports on the host</span>
# nmap -sP 192.168.16.0/24 <span class="cmt" style="background-color: transparent; color: #000040;"># Find out which IP are used and by which host on 0/24</span>
# nmap -sS -sV -O cb.vu <span class="cmt" style="background-color: transparent; color: #000040;"># Do a stealth SYN scan with version and OS detection</span>
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 3.8.1p1 FreeBSD-20060930 (protocol 2.0)
25/tcp open smtp Sendmail smtpd 8.13.6/8.13.6
80/tcp open http Apache httpd 2.0.59 ((FreeBSD) DAV/2 PHP/4.
[...]
Running: FreeBSD 5.X
Uptime 33.120 days (since Fri Aug 31 11:41:04 2007)
</pre>
Other non standard but useful tools are <code style="color: #003300;">hping</code> (www.hping.org) an IP packet assembler/analyzer and <code style="color: #003300;">fping</code> (fping.sourceforge.net). fping can check multiple hosts in a round-robin fashion.<h2 id="trafficctrl" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Traffic control (QoS)</h2>
Traffic control manages the queuing, policing, scheduling, and other traffic parameters for a network. The following examples are simple practical uses of the Linux and FreeBSD capabilities to better use the available bandwidth.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Limit upload</h3>
DSL or cable modems have a long queue to improve the upload throughput. However filling the queue with a fast device (e.g. ethernet) will dramatically decrease the interactivity. It is therefore useful to limit the device upload rate to match the physical capacity of the modem, this should greatly improve the interactivity. Set to about 90% of the modem maximal (cable) speed.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Linux</h4>
For a 512 Kbit upload modem.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tc qdisc add dev eth0 root tbf rate 480kbit latency 50ms burst 1540
# tc -s qdisc ls dev eth0 <span class="cmt" style="background-color: transparent; color: #000040;"># Status</span>
# tc qdisc del dev eth0 root <span class="cmt" style="background-color: transparent; color: #000040;"># Delete the queue</span>
# tc qdisc change dev eth0 root tbf rate 220kbit latency 50ms burst 1540
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
FreeBSD</h4>
FreeBSD uses the <code style="color: #003300;">dummynet</code> traffic shaper which is configured with ipfw. Pipes are used to set limits the bandwidth in units of [K|M]{bit/s|Byte/s}, 0 means unlimited bandwidth. Using the same pipe number will reconfigure it. For example limit the upload bandwidth to 500 Kbit.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># kldload dummynet <span class="cmt" style="background-color: transparent; color: #000040;"># load the module if necessary</span>
# ipfw pipe 1 config bw 500Kbit/s <span class="cmt" style="background-color: transparent; color: #000040;"># create a pipe with limited bandwidth</span>
# ipfw add pipe 1 ip from me to any <span class="cmt" style="background-color: transparent; color: #000040;"># divert the full upload into the pipe</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Quality of service</h3>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Linux</h4>
Priority queuing with <code style="color: #003300;">tc</code> to optimize VoIP. See the full example on <a href="http://www.voip-info.org/wiki-QoS+Linux+with+HFS" rel="nofollow" style="background-color: transparent; color: #000040;">voip-info.org</a> or <a href="http://www.howtoforge.com/voip_qos_traffic_shaping_iproute2_asterisk" rel="nofollow" style="background-color: transparent; color: #000040;">www.howtoforge.com</a>. Suppose VoIP uses udp on ports 10000:11024 and device eth0 (could also be ppp0 or so). The following commands define the QoS to three queues and force the VoIP traffic to queue 1 with QoS <code style="color: #003300;">0x1e</code> (all bits set). The default traffic flows into queue 3 and QoS <i>Minimize-Delay</i> flows into queue 2.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tc qdisc add dev eth0 root handle 1: prio priomap 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 0
# tc qdisc add dev eth0 parent 1:1 handle 10: sfq
# tc qdisc add dev eth0 parent 1:2 handle 20: sfq
# tc qdisc add dev eth0 parent 1:3 handle 30: sfq
# tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \
match ip dport 10000 0x3C00 flowid 1:1 <span class="cmt" style="background-color: transparent; color: #000040;"># use server port range</span>
match ip dst 123.23.0.1 flowid 1:1 <span class="cmt" style="background-color: transparent; color: #000040;"># or/and use server IP</span>
</pre>
Status and remove with<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tc -s qdisc ls dev eth0 <span class="cmt" style="background-color: transparent; color: #000040;"># queue status</span>
# tc qdisc del dev eth0 root <span class="cmt" style="background-color: transparent; color: #000040;"># delete all QoS</span>
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Calculate port range and mask</h4>
The tc filter defines the port range with port and mask which you have to calculate. Find the 2^N <i>ending</i> of the port range, deduce the range and convert to HEX. This is your mask. Example for 10000 -> 11024, the range is 1024.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># 2^13 (8192) < 10000 < 2^14 (16384) <span class="cmt" style="background-color: transparent; color: #000040;"># ending is 2^14 = 16384</span>
# echo "obase=16;(2^14)-1024" | bc <span class="cmt" style="background-color: transparent; color: #000040;"># mask is 0x3C00</span>
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
FreeBSD</h4>
The max link bandwidth is 500Kbit/s and we define 3 queues with priority 100:10:1 for VoIP:ssh:all the rest.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ipfw pipe 1 config bw 500Kbit/s
# ipfw queue 1 config pipe 1 weight 100
# ipfw queue 2 config pipe 1 weight 10
# ipfw queue 3 config pipe 1 weight 1
# ipfw add 10 queue 1 proto udp dst-port 10000-11024
# ipfw add 11 queue 1 proto udp dst-ip 123.23.0.1 <span class="cmt" style="background-color: transparent; color: #000040;"># or/and use server IP</span>
# ipfw add 20 queue 2 dsp-port ssh
# ipfw add 30 queue 3 from me to any <span class="cmt" style="background-color: transparent; color: #000040;"># all the rest</span>
</pre>
Status and remove with<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ipfw list <span class="cmt" style="background-color: transparent; color: #000040;"># rules status</span>
# ipfw pipe list <span class="cmt" style="background-color: transparent; color: #000040;"># pipe status</span>
# ipfw flush <span class="cmt" style="background-color: transparent; color: #000040;"># deletes all rules but default</span>
</pre>
<h2 id="nis" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
NIS Debugging</h2>
Some commands which should work on a well configured NIS client:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ypwhich <span class="cmt" style="background-color: transparent; color: #000040;"># get the connected NIS server name</span>
# domainname <span class="cmt" style="background-color: transparent; color: #000040;"># The NIS domain name as configured</span>
# ypcat group <span class="cmt" style="background-color: transparent; color: #000040;"># should display the group from the NIS server</span>
# cd /var/yp && make <span class="cmt" style="background-color: transparent; color: #000040;"># Rebuild the yp database</span>
# rpcinfo -p servername <span class="cmt" style="background-color: transparent; color: #000040;"># Report RPC services of the server</span>
</pre>
Is ypbind running?<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ps auxww | grep ypbind
/usr/sbin/ypbind -s -m -S servername1,servername2 <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD</span>
/usr/sbin/ypbind <span class="cmt" style="background-color: transparent; color: #000040;"># Linux</span>
# yppoll passwd.byname
Map passwd.byname has order number 1190635041. Mon Sep 24 13:57:21 2007
The master server is servername.domain.net.
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat /etc/yp.conf
ypserver servername
domain domain.net broadcast
</pre>
<h2 id="netcat" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Netcat</h2>
<a href="http://netcat.sourceforge.net/" rel="nofollow" style="background-color: transparent; color: #000040;">Netcat</a> (nc) is better known as the "network Swiss Army Knife", it can manipulate, create or read/write TCP/IP connections. Here some useful examples, there are many more on the net, for example <a href="http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples" rel="nofollow" style="background-color: transparent; color: #000040;">g-loaded.eu[...]</a> and <a href="http://www.terminally-incoherent.com/blog/2007/08/07/few-useful-netcat-tricks" rel="nofollow" style="background-color: transparent; color: #000040;">here</a>.<br />You might need to use the command <code style="color: #003300;">netcat</code> instead of <code style="color: #003300;">nc</code>. Also see the similar command <a href="http://www.dest-unreach.org/socat" rel="nofollow" style="background-color: transparent; color: #000040;">socat</a>.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
File transfer</h3>
Copy a large folder over a raw tcp connection. The transfer is very quick (no protocol overhead) and you don't need to mess up with NFS or SMB or FTP or so, simply make the file available on the server, and get it from the client. Here 192.168.1.1 is the server IP address.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">server#</span> tar -cf - -C VIDEO_TS . | nc -l -p 4444 <span class="cmt" style="background-color: transparent; color: #000040;"># Serve tar folder on port 4444</span>
<span class="cmt" style="background-color: transparent; color: #000040;">client#</span> nc 192.168.1.1 4444 | tar xpf - -C VIDEO_TS <span class="cmt" style="background-color: transparent; color: #000040;"># Pull the file on port 4444</span>
<span class="cmt" style="background-color: transparent; color: #000040;">server#</span> cat largefile | nc -l 5678 <span class="cmt" style="background-color: transparent; color: #000040;"># Server a single file</span>
<span class="cmt" style="background-color: transparent; color: #000040;">client#</span> nc 192.168.1.1 5678 > largefile <span class="cmt" style="background-color: transparent; color: #000040;"># Pull the single file</span>
<span class="cmt" style="background-color: transparent; color: #000040;">server#</span> dd if=/dev/da0 | nc -l 4444 <span class="cmt" style="background-color: transparent; color: #000040;"># Server partition image</span>
<span class="cmt" style="background-color: transparent; color: #000040;">client#</span> nc 192.168.1.1 4444 | dd of=/dev/da0 <span class="cmt" style="background-color: transparent; color: #000040;"># Pull partition to clone</span>
<span class="cmt" style="background-color: transparent; color: #000040;">client#</span> nc 192.168.1.1 4444 | dd of=da0.img <span class="cmt" style="background-color: transparent; color: #000040;"># Pull partition to file</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Other hacks</h3>
Specially here, you must know what you are doing.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Remote shell</h4>
Option -e only on the Windows version? Or use <a href="http://download.insecure.org/stf/nc110.tgz" rel="nofollow" style="background-color: transparent; color: #000040;">nc 1.10</a>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># nc -lp 4444 -e /bin/bash <span class="cmt" style="background-color: transparent; color: #000040;"># Provide a remote shell (server backdoor)</span>
# nc -lp 4444 -e cmd.exe <span class="cmt" style="background-color: transparent; color: #000040;"># remote shell for Windows</span>
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Emergency web server</h4>
Serve a single file on port 80 in a loop.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># while true; do nc -l -p 80 < unixtoolbox.xhtml; done
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Chat</h4>
Alice and Bob can chat over a simple TCP socket. The text is transferred with the enter key.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">alice#</span> nc -lp 4444
<span class="cmt" style="background-color: transparent; color: #000040;">bob #</span> nc 192.168.1.1 4444
</pre>
</div>
<div id="ssh" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">SSH SCP</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#publickey" style="background-color: transparent; color: #000040;">Public key</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#sshfingerprint" style="background-color: transparent; color: #000040;">Fingerprint</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#scp" style="background-color: transparent; color: #000040;">SCP</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#sshtunnel" style="background-color: transparent; color: #000040;">Tunneling</a></div>
See other tricks <a href="http://blog.urfix.com/25-ssh-commands-tricks/" style="background-color: transparent; color: #000040;">25 ssh cmd</a><h2 id="publickey" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Public key authentication</h2>
Connect to a host without password using public key authentication. The idea is to append your public key to the authorized_keys2 file on the remote host. For this example let's <b>connect <i>host-client</i> to <i>host-server</i></b>, the key is generated on the client. With cygwin you might have to create your home directoy and the .ssh directory with <code style="color: #003300;"># mkdir -p /home/USER/.ssh</code><ul>
<li>Use ssh-keygen to generate a key pair. <code style="color: #003300;">~/.ssh/id_dsa</code> is the private key, <code style="color: #003300;">~/.ssh/id_dsa.pub</code> is the public key.</li>
<li>Copy only the public key to the server and append it to the file <code style="color: #003300;">~/.ssh/authorized_keys2</code> on your home on the server.</li>
</ul>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh-keygen -t dsa -N ''
# cat ~/.ssh/id_dsa.pub | ssh you@host-server "cat - >> ~/.ssh/authorized_keys2"
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Using the Windows client from ssh.com</h3>
The non commercial version of the ssh.com client can be downloaded the main ftp site: <a href="http://ftp.ssh.com/pub/ssh/" rel="nofollow" style="background-color: transparent; color: #000040;">ftp.ssh.com/pub/ssh/</a>. Keys generated by the ssh.com client need to be converted for the OpenSSH server. This can be done with the ssh-keygen command.<ul>
<li>Create a key pair with the ssh.com client: Settings - User Authentication - Generate New....</li>
<li>I use Key type DSA; key length 2048.</li>
<li>Copy the public key generated by the ssh.com client to the server into the ~/.ssh folder.</li>
<li>The keys are in C:\Documents and Settings\%USERNAME%\Application Data\SSH\UserKeys.</li>
<li>Use the ssh-keygen command on the server to convert the key:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd ~/.ssh
# ssh-keygen -i -f keyfilename.pub >> authorized_keys2
</pre>
</li>
</ul>
<i>Notice:</i> We used a DSA key, RSA is also possible. The key is not protected by a password.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Using putty for Windows</h3>
<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" style="background-color: transparent; color: #000040;">Putty</a> is a simple and free ssh client for Windows.<ul>
<li>Create a key pair with the puTTYgen program.</li>
<li>Save the public and private keys (for example into C:\Documents and Settings\%USERNAME%\.ssh).</li>
<li>Copy the public key to the server into the ~/.ssh folder:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># scp .ssh/puttykey.pub root@192.168.51.254:.ssh/</pre>
</li>
<li>Use the ssh-keygen command on the server to convert the key for OpenSSH:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd ~/.ssh
# ssh-keygen -i -f puttykey.pub >> authorized_keys2
</pre>
</li>
<li>Point the private key location in the putty settings: Connection - SSH - Auth</li>
</ul>
<h2 id="sshfingerprint" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Check fingerprint</h2>
At the first login, ssh will ask if the unknown host with the fingerprint has to be stored in the known hosts. To avoid a man-in-the-middle attack the administrator of the server can send you the server fingerprint which is then compared on the first login. Use <code style="color: #003300;">ssh-keygen -l</code> to get the fingerprint (on the server):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub <span class="cmt" style="background-color: transparent; color: #000040;"># For RSA key</span>
2048 61:33:be:9b:ae:6c:36:31:fd:83:98:b7:99:2d:9f:cd /etc/ssh/ssh_host_rsa_key.pub
# ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub <span class="cmt" style="background-color: transparent; color: #000040;"># For DSA key (default)</span>
2048 14:4a:aa:d9:73:25:46:6d:0a:48:35:c7:f4:16:d4:ee /etc/ssh/ssh_host_dsa_key.pub
</pre>
Now the client connecting to this server can verify that he is connecting to the right server:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh linda
The authenticity of host 'linda (192.168.16.54)' can't be established.
DSA key fingerprint is 14:4a:aa:d9:73:25:46:6d:0a:48:35:c7:f4:16:d4:ee.
Are you sure you want to continue connecting (yes/no)? yes
</pre>
<h2 id="scp" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Secure file transfer</h2>
Some simple commands:<br /><pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># scp file.txt host-two:/tmp
# scp joe@host-two:/www/*.html /www/tmp
# scp -r joe@host-two:/www /www/tmp
</pre>
In Konqueror or Midnight Commander it is possible to access a remote file system with the address <strong>fish://user@gate</strong>. However the implementation is very slow.<br />Furthermore it is possible to mount a remote folder with <strong>sshfs</strong> a file system client based on SCP. <a href="http://fuse.sourceforge.net/sshfs.html" style="background-color: transparent; color: #000040;">See fuse sshfs</a>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">ssh_exchange_identification: Connection closed by remote host</pre>
With this error try the following on the server:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">echo 'SSHD: ALL' >> /etc/hosts.allow
/etc/init.d/sshd restart</pre>
<h2 id="sshtunnel" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Tunneling</h2>
SSH tunneling allows to forward or reverse forward a port over the SSH connection, thus securing the traffic and accessing ports which would otherwise be blocked. This only works with TCP. The general nomenclature for forward and reverse is (see also <a href="http://cb.vu/unixtoolbox.xhtml#sshnat" style="background-color: transparent; color: #000040;">ssh and NAT example</a>):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -L localport:desthost:destport user@gate <span class="cmt" style="background-color: transparent; color: #000040;"># desthost as seen from the gate</span>
# ssh -R destport:desthost:localport user@gate <span class="cmt" style="background-color: transparent; color: #000040;"># forwards your localport to destination</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># desthost:localport as seen from the client initiating the tunnel</span>
# ssh -X user@gate <span class="cmt" style="background-color: transparent; color: #000040;"># To force X forwarding</span>
</pre>
This will connect to gate and forward the local port to the host desthost:destport. Note desthost is the destination host <i>as seen by the gate</i>, so if the connection is to the gate, then desthost is localhost. More than one port forward is possible.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Direct forward on the gate</h3>
Let say we want to access the CVS (port 2401) and http (port 80) which are running on the gate. This is the simplest example, desthost is thus localhost, and we use the port 8080 locally instead of 80 so we don't need to be root. Once the ssh session is open, both services are accessible on the local ports.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -L 2401:localhost:2401 -L 8080:localhost:80 user@gate</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Netbios and remote desktop forward to a second server</h3>
Let say a Windows smb server is behind the gate and is not running ssh. We need access to the smb share and also remote desktop to the server.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -L 139:smbserver:139 -L 3388:smbserver:3389 user@gate</pre>
The smb share can now be accessed with \\127.0.0.1\, but only if the local share is disabled, because <i>the local share is listening on port 139</i>.<br />It is possible to keep the local share enabled, for this we need to create a new virtual device with a new IP address for the tunnel, the smb share will be connected over this address. Furthermore <i>the local RDP is already listening on 3389</i>, so we choose 3388. For this example let's use a virtual IP of 10.1.1.1.<br /><ul>
<li>With putty use Source port=10.1.1.1:139. It is possible to create multiple loop devices and tunnel. On Windows 2000, only putty worked for me. On Windows Vista also forward the port 445 in addition to the port 139. Also on Vista the patch KB942624 prevents the port 445 to be forwarded, so I had to uninstall this path in Vista.</li>
<li>With the ssh.com client, disable "Allow local connections only". Since ssh.com will bind to all addresses, only a single share can be connected.</li>
</ul>
Now create the loopback interface with IP 10.1.1.1:<ul>
<li># System->Control Panel->Add Hardware # Yes, Hardware is already connected # Add a new hardware device (at bottom).</li>
<li># Install the hardware that I manually select # Network adapters # Microsoft , Microsoft Loopback Adapter.</li>
<li>Configure the IP address of the fake device to 10.1.1.1 mask 255.255.255.0, no gateway.</li>
<li>advanced->WINS, Enable LMHosts Lookup; Disable NetBIOS over TCP/IP.</li>
<li># Enable Client for Microsoft Networks. # Disable File and Printer Sharing for Microsoft Networks.</li>
</ul>
I HAD to reboot for this to work. Now connect to the smb share with \\10.1.1.1 and remote desktop to 10.1.1.1:3388.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Debug</h4>
If it is not working:<ul>
<li>Are the ports forwarded: netstat -an? Look at 0.0.0.0:139 or 10.1.1.1:139</li>
<li>Does telnet 10.1.1.1 139 connect?</li>
<li>You need the checkbox "Local ports accept connections from other hosts".</li>
<li>Is "File and Printer Sharing for Microsoft Networks" disabled on the loopback interface?</li>
</ul>
<h3 id="sshnat" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Connect two clients behind NAT</h3>
Suppose two clients are behind a NAT gateway and client cliadmin has to connect to client cliuser (the destination), both can login to the gate with ssh and are running Linux with sshd. You don't need root access anywhere as long as the ports on gate are above 1024. We use 2022 on gate. Also since the gate is used locally, the option GatewayPorts is not necessary.<br />On client cliuser (from destination to gate):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -R 2022:localhost:22 user@gate <span class="cmt" style="background-color: transparent; color: #000040;"># forwards client 22 to gate:2022</span></pre>
On client cliadmin (from host to gate):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -L 3022:localhost:2022 admin@gate <span class="cmt" style="background-color: transparent; color: #000040;"># forwards client 3022 to gate:2022</span></pre>
Now the admin can connect directly to the client cliuser with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -p 3022 admin@localhost <span class="cmt" style="background-color: transparent; color: #000040;"># local:3022 -> gate:2022 -> client:22</span></pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Connect to VNC behind NAT</h3>
Suppose a Windows client with VNC listening on port 5900 has to be accessed from behind NAT. On client cliwin to gate:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -R 15900:localhost:5900 user@gate</pre>
On client cliadmin (from host to gate):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -L 5900:localhost:15900 admin@gate</pre>
Now the admin can connect directly to the client VNC with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># vncconnect -display :0 localhost</pre>
<h3 id="sshmultihop" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Dig a multi-hop ssh tunnel</h3>
Suppose you can not reach a server directly with ssh, but only via multiple intermediate hosts (for example because of routing issues). Sometimes it is still necessary to get a direct client - server connection, for example to copy files with scp, or forward other ports like smb or vnc. One way to do this is to chain tunnels together to forward a port to the server along the hops. This "carrier" port only reaches its final destination on the last connection to the server.<br />Suppose we want to forward the ssh port from a client to a server over two hops. Once the tunnel is build, it is possible to connect to the server directly from the client (and also add an other port forward).<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Create tunnel in one shell</h4>
client -> host1 -> host2 -> server and dig tunnel 5678<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">client></span># ssh -L5678:localhost:5678 host1 <span class="cmt" style="background-color: transparent; color: #000040;"># 5678 is an arbitrary port for the tunnel</span>
<span class="cmt" style="background-color: transparent; color: #000040;">host_1></span># ssh -L5678:localhost:5678 host2 <span class="cmt" style="background-color: transparent; color: #000040;"># chain 5678 from host1 to host2</span>
<span class="cmt" style="background-color: transparent; color: #000040;">host_2></span># ssh -L5678:localhost:22 server <span class="cmt" style="background-color: transparent; color: #000040;"># end the tunnel on port 22 on the server</span>
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Use tunnel with an other shell</h4>
client -> server using tunnel 5678<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -p 5678 localhost <span class="cmt" style="background-color: transparent; color: #000040;"># connect directly from client to server</span>
# scp -P 5678 myfile localhost:/tmp/ <span class="cmt" style="background-color: transparent; color: #000040;"># or copy a file directly using the tunnel</span>
# rsync -e 'ssh -p 5678' myfile localhost:/tmp/ <span class="cmt" style="background-color: transparent; color: #000040;"># or rsync a file directly to the server</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Autoconnect and keep alive script</h3>
I use variations of the following script to keep a machine reacheable over a reverse ssh tunnel. The connection is automatically rebuilt if closed. You can add multiple <code style="color: #003300;">-L</code> or <code style="color: #003300;">-R</code> tunnels on one line.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">#!/bin/sh
COMMAND="ssh -N -f -g -R 3022:localhost:22 colin@cb.vu"
pgrep -f -x "$COMMAND" > /dev/null 2>&1 || $COMMAND
exit 0
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">1 * * * * colin /home/colin/port_forward.sh <span class="cmt" style="background-color: transparent; color: #000040;"># crontab entry (here hourly)</span></pre>
</div>
<div id="vpn" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">VPN WITH SSH</a></h1>
As of version 4.3, OpenSSH can use the tun/tap device to encrypt a tunnel. This is very similar to other TLS based VPN solutions like OpenVPN. One advantage with SSH is that there is no need to install and configure additional software. Additionally the tunnel uses the SSH authentication like pre shared keys. The drawback is that the encapsulation is done over TCP which might result in poor performance on a slow link. Also the tunnel is relying on a single (fragile) TCP connection. This technique is very useful for a quick IP based VPN setup. There is no limitation as with the single TCP port forward, all layer 3/4 protocols like ICMP, TCP/UDP, etc. are forwarded over the VPN. In any case, the following options are needed in the sshd_conf file:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">PermitRootLogin yes
PermitTunnel yes
</pre>
<h2 id="sshp2p" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Single P2P connection</h2>
Here we are connecting two hosts, hclient and hserver with a peer to peer tunnel. The connection is <i>started from hclient</i> to hserver and is done as root. The tunnel end points are 10.0.1.1 (server) and 10.0.1.2 (client) and we create a device tun5 (this could also be an other number). The procedure is very simple:<ul>
<li>Connect with SSH using the tunnel option -w</li>
<li>Configure the IP addresses of the tunnel. Once on the server and once on the client.</li>
</ul>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Connect to the server</h3>
Connection started on the client and commands are executed on the server.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Server is on Linux</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">cli>#</span> ssh -w5:5 root@hserver
<span class="cmt" style="background-color: transparent; color: #000040;">srv>#</span> ifconfig tun5 10.0.1.1 netmask 255.255.255.252 <span class="cmt" style="background-color: transparent; color: #000040;"># Executed on the server shell</span>
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Server is on FreeBSD</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">cli>#</span> ssh -w5:5 root@hserver
<span class="cmt" style="background-color: transparent; color: #000040;">srv>#</span> ifconfig tun5 10.0.1.1 10.0.1.2 <span class="cmt" style="background-color: transparent; color: #000040;"># Executed on the server shell</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Configure the client</h3>
Commands executed on the client:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">cli>#</span> ifconfig tun5 10.0.1.2 netmask 255.255.255.252 <span class="cmt" style="background-color: transparent; color: #000040;"># Client is on Linux</span>
<span class="cmt" style="background-color: transparent; color: #000040;">cli>#</span> ifconfig tun5 10.0.1.2 10.0.1.1 <span class="cmt" style="background-color: transparent; color: #000040;"># Client is on FreeBSD</span>
</pre>
The two hosts are now connected and can transparently communicate with any layer 3/4 protocol using the tunnel IP addresses.<h2 id="sshg2g" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Connect two networks</h2>
In addition to the p2p setup above, it is more useful to connect two private networks with an SSH VPN using two gates. Suppose for the example, netA is 192.168.51.0/24 and netB 192.168.16.0/24. The procedure is similar as above, we only need to add the routing. NAT must be activated on the private interface only if the gates are not the same as the default gateway of their network.<br />192.168.51.0/24 (netA)|gateA <-> gateB|192.168.16.0/24 (netB)<br /><ul>
<li>Connect with SSH using the tunnel option -w.</li>
<li>Configure the IP addresses of the tunnel. Once on the server and once on the client.</li>
<li>Add the routing for the two networks.</li>
<li>If necessary, activate NAT on the private interface of the gate.</li>
</ul>
The setup is <i>started from gateA in netA</i>.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Connect from gateA to gateB</h3>
Connection is started from gateA and commands are executed on gateB.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
gateB is on Linux</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> ssh -w5:5 root@gateB
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> ifconfig tun5 10.0.1.1 netmask 255.255.255.252 <span class="cmt" style="background-color: transparent; color: #000040;"># Executed on the gateB shell</span>
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> route add -net 192.168.51.0 netmask 255.255.255.0 dev tun5
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> echo 1 > /proc/sys/net/ipv4/ip_forward <span class="cmt" style="background-color: transparent; color: #000040;"># Only needed if not default gw</span>
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
gateB is on FreeBSD</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> ssh -w5:5 root@gateB <span class="cmt" style="background-color: transparent; color: #000040;"># Creates the tun5 devices</span>
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> ifconfig tun5 10.0.1.1 10.0.1.2 <span class="cmt" style="background-color: transparent; color: #000040;"># Executed on the gateB shell</span>
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> route add 192.168.51.0/24 10.0.1.2
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> sysctl net.inet.ip.forwarding=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Only needed if not default gw</span>
<span class="cmt" style="background-color: transparent; color: #000040;">gateB>#</span> natd -s -m -u -dynamic -n fxp0 <span class="cmt" style="background-color: transparent; color: #000040;"># see <a class="xref" href="http://cb.vu/unixtoolbox.xhtml#nat" style="background-color: transparent; color: #000040;">NAT</a></span>
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> sysctl net.inet.ip.fw.enable=1
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Configure gateA</h3>
Commands executed on gateA:<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
gateA is on Linux</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> ifconfig tun5 10.0.1.2 netmask 255.255.255.252
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> route add -net 192.168.16.0 netmask 255.255.255.0 dev tun5
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> echo 1 > /proc/sys/net/ipv4/ip_forward
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
gateA is on FreeBSD</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> ifconfig tun5 10.0.1.2 10.0.1.1
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> route add 192.168.16.0/24 10.0.1.2
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> sysctl net.inet.ip.forwarding=1
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> natd -s -m -u -dynamic -n fxp0 <span class="cmt" style="background-color: transparent; color: #000040;"># see <a class="xref" href="http://cb.vu/unixtoolbox.xhtml#nat" style="background-color: transparent; color: #000040;">NAT</a></span>
<span class="cmt" style="background-color: transparent; color: #000040;">gateA>#</span> sysctl net.inet.ip.fw.enable=1
</pre>
The two private networks are now transparently connected via the SSH VPN. The IP forward and NAT settings are only necessary if the gates are not the default gateways. In this case the clients would not know where to forward the response, and nat must be activated.</div>
<div id="rsync" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">RSYNC</a></h1>
Rsync can almost completely replace cp and scp, furthermore interrupted transfers are efficiently restarted. A trailing slash (and the absence thereof) has different meanings, the man page is good... Here some examples:<br />Copy the directories with full content:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># rsync -a /home/colin/ /backup/colin/ <span class="cmt" style="background-color: transparent; color: #000040;"># "archive" mode. e.g keep the same</span>
# rsync -a /var/ /var_bak/
# rsync -aR --delete-during /home/user/ /backup/ <span class="cmt" style="background-color: transparent; color: #000040;"># use relative (see below)</span>
# /opt/local/bin/rsync -azv --iconv=UTF-8-MAC,UTF-8 ~/Music/flac/ me@server:/dst/
<span class="cmt" style="background-color: transparent; color: #000040;"># convert filenames OSX UTF8 to Windows UTF8</span>
</pre>
Same as before but over the network and with compression. Rsync uses SSH for the transport per default and will use the ssh key if they are set. Use ":" as with SCP. A typical remote copy:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># rsync -axSRzv /home/user/ user@server:/backup/user/ <span class="cmt" style="background-color: transparent; color: #000040;"># Copy to remote</span>
# rsync -a 'user@server:My\ Documents' My\ Documents <span class="cmt" style="background-color: transparent; color: #000040;"># Quote AND escape spaces for the remote shell</span></pre>
Exclude any directory tmp within /home/user/ and keep the relative folders hierarchy, that is the remote directory will have the structure /backup/home/user/. This is typically used for backups.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># rsync -azR --exclude=tmp/ /home/user/ user@server:/backup/</pre>
Use port 20022 for the ssh connection:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># rsync -az -e 'ssh -p 20022' /home/colin/ user@server:/backup/colin/</pre>
Using the rsync daemon (used with "::") is much faster, but not encrypted over ssh. The location of /backup is defined by the configuration in /etc/rsyncd.conf. The variable RSYNC_PASSWORD can be set to avoid the need to enter the password manually.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># rsync -axSRz /home/ ruser@hostname::rmodule/backup/
# rsync -axSRz ruser@hostname::rmodule/backup/ /home/ <span class="cmt" style="background-color: transparent; color: #000040;"># To copy back</span>
</pre>
Some important options:<ul style="list-style-type: none;">
<li><code style="color: #003300;">-a, --archive</code> archive mode; same as -rlptgoD (no -H)</li>
<li><code style="color: #003300;">-r, --recursive</code> recurse into directories</li>
<li><code style="color: #003300;">-R, --relative</code> use relative path names</li>
<li><code style="color: #003300;">-H, --hard-links</code> preserve hard links</li>
<li><code style="color: #003300;">-S, --sparse</code> handle sparse files efficiently</li>
<li><code style="color: #003300;">-x, --one-file-system</code> don't cross file system boundaries</li>
<li><code style="color: #003300;">--exclude=PATTERN</code> exclude files matching PATTERN</li>
<li><code style="color: #003300;">--delete-during</code> receiver deletes during xfer, not before</li>
<li><code style="color: #003300;">--delete-after</code> receiver deletes after transfer, not before</li>
</ul>
<h2 id="winrsync" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Rsync on Windows</h2>
Rsync is available for Windows through cygwin or as stand-alone packaged in <a href="http://sourceforge.net/projects/sereds/" style="background-color: transparent; color: #000040;">cwrsync</a>. This is very convenient for automated backups. Install one of them (<i>not both</i>) and add the path to the Windows system variables: # Control Panel -> System -> tab Advanced, button Environment Variables. Edit the "Path" system variable and add the full path to the installed rsync, e.g. C:\Program Files\cwRsync\bin or C:\cygwin\bin. This way the commands <code style="color: #003300;">rsync</code> and <code style="color: #003300;">ssh</code> are available in a Windows command shell.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Public key authentication</h3>
Rsync is automatically tunneled over SSH and thus uses the SSH authentication on the server. Automatic backups have to avoid a user interaction, for this the SSH public key authentication can be used and the rsync command will run without a password.<br />All the following commands are executed within a Windows console. In a console (Start -> Run -> cmd) create and upload the key as described in <a href="http://cb.vu/unixtoolbox.xhtml#ssh" style="background-color: transparent; color: #000040;">SSH</a>, change "user" and "server" as appropriate. If the file authorized_keys2 does not exist yet, simply copy id_dsa.pub to authorized_keys2 and upload it.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh-keygen -t dsa -N '' <span class="cmt" style="background-color: transparent; color: #000040;"># Creates a public and a private key</span>
# rsync user@server:.ssh/authorized_keys2 . <span class="cmt" style="background-color: transparent; color: #000040;"># Copy the file locally from the server</span>
# cat id_dsa.pub >> authorized_keys2 <span class="cmt" style="background-color: transparent; color: #000040;"># Or use an editor to add the key</span>
# rsync authorized_keys2 user@server:.ssh/ <span class="cmt" style="background-color: transparent; color: #000040;"># Copy the file back to the server</span>
# del authorized_keys2 <span class="cmt" style="background-color: transparent; color: #000040;"># Remove the local copy</span>
</pre>
Now test it with (in one line):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">rsync -rv "/cygdrive/c/Documents and Settings/%USERNAME%/My Documents/" \
'user@server:My\ Documents/'
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Automatic backup</h3>
Use a batch file to automate the backup and add the file in the scheduled tasks (Programs -> Accessories -> System Tools -> Scheduled Tasks). For example create the file backup.bat and replace user@server.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">@ECHO OFF
REM rsync the directory My Documents
SETLOCAL
SET CWRSYNCHOME=C:\PROGRAM FILES\CWRSYNC
SET CYGWIN=nontsec
SET CWOLDPATH=%PATH%
REM uncomment the next line when using cygwin
SET PATH=%CWRSYNCHOME%\BIN;%PATH%
echo Press Control-C to abort
rsync -av "/cygdrive/c/Documents and Settings/%USERNAME%/My Documents/" \
'user@server:My\ Documents/'
pause
</pre>
</div>
<div id="sudo" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">SUDO</a></h1>
Sudo is a standard way to give users some administrative rights without giving out the root password. Sudo is very useful in a multi user environment with a mix of server and workstations. Simply call the command with sudo:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sudo /etc/init.d/dhcpd restart <span class="cmt" style="background-color: transparent; color: #000040;"># Run the rc script as root</span>
# sudo -u sysadmin whoami <span class="cmt" style="background-color: transparent; color: #000040;"># Run cmd as an other user</span>
</pre>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Configuration</h2>
Sudo is configured in <code style="color: #003300;">/etc/sudoers</code> and must only be edited with <code style="color: #003300;">visudo</code>. The basic syntax is (the lists are comma separated):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">user hosts = (runas) commands <span class="cmt" style="background-color: transparent; color: #000040;"># In /etc/sudoers</span></pre>
<ul style="list-style-type: none; page-break-inside: avoid;">
<li><code style="color: #003300;">users</code> one or more users or %group (like %wheel) to gain the rights</li>
<li><code style="color: #003300;">hosts</code> list of hosts (or ALL)</li>
<li><code style="color: #003300;">runas</code> list of users (or ALL) that the command rule can be run as. It is enclosed in ( )!</li>
<li><code style="color: #003300;">commands</code> list of commands (or ALL) that will be run as root or as (runas)</li>
</ul>
Additionally those keywords can be defined as alias, they are called User_Alias, Host_Alias, Runas_Alias and Cmnd_Alias. This is useful for larger setups. Here a sudoers example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat /etc/sudoers
<span class="cmt" style="background-color: transparent; color: #000040;"># Host aliases are subnets or hostnames.</span>
Host_Alias DMZ = 212.118.81.40/28
Host_Alias DESKTOP = work1, work2
<span class="cmt" style="background-color: transparent; color: #000040;"># User aliases are a list of users which can have the same rights</span>
User_Alias ADMINS = colin, luca, admin
User_Alias DEVEL = joe, jack, julia
Runas_Alias DBA = oracle,pgsql
<span class="cmt" style="background-color: transparent; color: #000040;"># Command aliases define the full path of a list of commands</span>
Cmnd_Alias SYSTEM = /sbin/reboot,/usr/bin/kill,/sbin/halt,/sbin/shutdown,/etc/init.d/
Cmnd_Alias PW = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root <span class="cmt" style="background-color: transparent; color: #000040;"># Not root pwd!</span>
Cmnd_Alias DEBUG = /usr/sbin/tcpdump,/usr/bin/wireshark,/usr/bin/nmap
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;"># The actual rules</span>
root,ADMINS ALL = (ALL) NOPASSWD: ALL <span class="cmt" style="background-color: transparent; color: #000040;"># ADMINS can do anything w/o a password.</span>
DEVEL DESKTOP = (ALL) NOPASSWD: ALL <span class="cmt" style="background-color: transparent; color: #000040;"># Developers have full right on desktops</span>
DEVEL DMZ = (ALL) NOPASSWD: DEBUG <span class="cmt" style="background-color: transparent; color: #000040;"># Developers can debug the DMZ servers.</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># User sysadmin can mess around in the DMZ servers with some commands.</span>
sysadmin DMZ = (ALL) NOPASSWD: SYSTEM,PW,DEBUG
sysadmin ALL,!DMZ = (ALL) NOPASSWD: ALL <span class="cmt" style="background-color: transparent; color: #000040;"># Can do anything outside the DMZ.</span>
%dba ALL = (DBA) ALL <span class="cmt" style="background-color: transparent; color: #000040;"># Group dba can run as database user.</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># anyone can mount/unmount a cd-rom on the desktop machines</span>
ALL DESKTOP = NOPASSWD: /sbin/mount /cdrom,/sbin/umount /cdrom
</pre>
</div>
<div id="crypt" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">ENCRYPT FILES</a></h1>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
OpenSSL</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
A single file</h3>
Encrypt and decrypt:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># openssl aes-128-cbc -salt -in file -out file.aes
# openssl aes-128-cbc -d -salt -in file.aes -out file
</pre>
Note that the file can of course be a tar archive.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
tar and encrypt a whole directory</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tar -cf - directory | openssl aes-128-cbc -salt -out directory.tar.aes <span class="cmt" style="background-color: transparent; color: #000040;"># Encrypt</span>
# openssl aes-128-cbc -d -salt -in directory.tar.aes | tar -x -f - <span class="cmt" style="background-color: transparent; color: #000040;"># Decrypt</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
tar zip and encrypt a whole directory</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tar -zcf - directory | openssl aes-128-cbc -salt -out directory.tar.gz.aes <span class="cmt" style="background-color: transparent; color: #000040;"># Encrypt</span>
# openssl aes-128-cbc -d -salt -in directory.tar.gz.aes | tar -xz -f - <span class="cmt" style="background-color: transparent; color: #000040;"># Decrypt</span>
</pre>
<ul>
<li>Use -k mysecretpassword after aes-128-cbc to avoid the interactive password request. However note that this is highly insecure.</li>
<li>Use <strong>aes-256-cbc</strong> instead of <strong>aes-128-cbc</strong> to get even stronger encryption. This uses also more CPU.</li>
</ul>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
GPG</h2>
<a href="http://gnupg.org/" style="background-color: transparent; color: #000040;">GnuPG</a> is well known to encrypt and sign emails or any data. Furthermore gpg and also provides an advanced key management system. This section only covers files encryption, not email usage, signing or the Web-Of-Trust.<br />The simplest encryption is with a symmetric cipher. In this case the file is encrypted with a password and anyone who knows the password can decrypt it, thus the keys are not needed. Gpg adds an extention ".gpg" to the encrypted file names.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gpg -c file <span class="cmt" style="background-color: transparent; color: #000040;"># Encrypt file with password</span>
# gpg file.gpg <span class="cmt" style="background-color: transparent; color: #000040;"># Decrypt file (optionally -o otherfile)</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Using keys</h3>
For more details see <a href="http://www.madboa.com/geek/gpg-quickstart" style="background-color: transparent; color: #000040;">GPG Quick Start</a> and <a href="http://aplawrence.com/Basics/gpg.html" style="background-color: transparent; color: #000040;">GPG/PGP Basics</a> and the <a href="http://gnupg.org/documentation" style="background-color: transparent; color: #000040;">gnupg documentation</a> among others.<br />The private and public keys are the heart of asymmetric cryptography. What is important to remember:<ul>
<li>Your public key is used by <i>others</i> to encrypt files that only you as the receiver can decrypt (not even the one who encrypted the file can decrypt it). The public key is thus meant to be distributed.</li>
<li>Your private key is encrypted with your passphrase and is used to decrypt files which were encrypted with <i>your</i> public key. The private key must be kept<b>secure</b>. Also if the key or passphrase is lost, so are all the files encrypted with your public key.</li>
<li>The key files are called keyrings as they can contain more than one key.</li>
</ul>
First generate a key pair. The defaults are fine, however you will have to enter at least your full name and email and optionally a comment. The comment is useful to create more than one key with the same name and email. Also you should use a "passphrase", not a simple password.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gpg --gen-key <span class="cmt" style="background-color: transparent; color: #000040;"># This can take a long time</span></pre>
The keys are stored in ~/.gnupg/ on Unix, on Windows they are typically stored in<br />C:/Documents and Settings/%USERNAME%/Application Data/gnupg/.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">~/.gnupg/pubring.gpg <span class="cmt" style="background-color: transparent; color: #000040;"># Contains your public keys and all others imported</span>
~/.gnupg/secring.gpg <span class="cmt" style="background-color: transparent; color: #000040;"># Can contain more than one private key</span>
</pre>
Short reminder on most used options:<ul style="list-style-type: none; page-break-inside: avoid;">
<li><b>-e</b> encrypt data</li>
<li><b>-d</b> decrypt data</li>
<li><b>-r</b> NAME encrypt for recipient NAME (or 'Full Name' or 'email@domain')</li>
<li><b>-a</b> create ascii armored output of a key</li>
<li><b>-o</b> use as output file</li>
</ul>
The examples use 'Your Name' and 'Alice' as the keys are referred to by the email or full name or partial name. For example I can use 'Colin' or 'c@cb.vu' for my key [Colin Barschel (cb.vu) <c@cb.vu>].<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Encrypt for personal use only</h3>
No need to export/import any key for this. You have both already.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gpg -e -r 'Your Name' file <span class="cmt" style="background-color: transparent; color: #000040;"># Encrypt with your public key</span>
# gpg -o file -d file.gpg <span class="cmt" style="background-color: transparent; color: #000040;"># Decrypt. Use -o or it goes to stdout</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Encrypt - Decrypt with keys</h3>
First you need to export your public key for someone else to use it. And you need to import the public say from Alice to encrypt a file for her. You can either handle the keys in simple ascii files or use a public key server.<br />For example Alice export her public key and you import it, you can then encrypt a file for her. That is only Alice will be able to decrypt it.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gpg -a -o alicekey.asc --export 'Alice' <span class="cmt" style="background-color: transparent; color: #000040;"># Alice exported her key in ascii file.</span>
# gpg --send-keys --keyserver subkeys.pgp.net KEYID <span class="cmt" style="background-color: transparent; color: #000040;"># Alice put her key on a server.</span>
# gpg --import alicekey.asc <span class="cmt" style="background-color: transparent; color: #000040;"># You import her key into your pubring.</span>
# gpg --search-keys --keyserver subkeys.pgp.net 'Alice' <span class="cmt" style="background-color: transparent; color: #000040;"># or get her key from a server.</span>
</pre>
Once the keys are imported it is very easy to encrypt or decrypt a file:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gpg -e -r 'Alice' file <span class="cmt" style="background-color: transparent; color: #000040;"># Encrypt the file for Alice.</span>
# gpg -d file.gpg -o file <span class="cmt" style="background-color: transparent; color: #000040;"># Decrypt a file encrypted by Alice for you.</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Key administration</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gpg --list-keys <span class="cmt" style="background-color: transparent; color: #000040;"># list public keys and see the KEYIDS</span>
<span class="cmt" style="background-color: transparent; color: #000040;">The KEYID follows the '/' e.g. for: pub 1024D/D12B77CE the KEYID is D12B77CE</span>
# gpg --gen-revoke 'Your Name' <span class="cmt" style="background-color: transparent; color: #000040;"># generate revocation certificate</span>
# gpg --list-secret-keys <span class="cmt" style="background-color: transparent; color: #000040;"># list private keys</span>
# gpg --delete-keys NAME <span class="cmt" style="background-color: transparent; color: #000040;"># delete a public key from local key ring</span>
# gpg --delete-secret-key NAME <span class="cmt" style="background-color: transparent; color: #000040;"># delete a secret key from local key ring</span>
# gpg --fingerprint KEYID <span class="cmt" style="background-color: transparent; color: #000040;"># Show the fingerprint of the key</span>
# gpg --edit-key KEYID <span class="cmt" style="background-color: transparent; color: #000040;"># Edit key (e.g sign or add/del email)</span>
</pre>
</div>
<div id="cryptpart" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">ENCRYPT PARTITIONS</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#wluks" style="background-color: transparent; color: #000040;">Linux with LUKS</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#woluks" style="background-color: transparent; color: #000040;">Linux dm-crypt only</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#bsdgeli" style="background-color: transparent; color: #000040;">FreeBSD GELI</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#bsdpwd" style="background-color: transparent; color: #000040;">FBSD pwd only</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#osxcrypt" style="background-color: transparent; color: #000040;">OS X image</a></div>
There are (many) other alternative methods to encrypt disks, I only show here the methods I know and use. Keep in mind that the security is only good as long the OS has not been tempered with. An intruder could easily record the password from the keyboard events. Furthermore the data is freely accessible when the partition is <i>attached</i> and will not prevent an intruder to have access to it in this state.<h2 id="dm-crypt" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Linux</h2>
Those instructions use the Linux <code style="color: #003300;">dm-crypt</code> (device-mapper) facility available on the 2.6 kernel. In this example, lets encrypt the partition <code style="color: #003300;">/dev/sdc1</code>, it could be however any other partition or disk, or USB or a file based partition created with <code style="color: #003300;">losetup</code>. In this case we would use <code style="color: #003300;">/dev/loop0</code>. See <a href="http://cb.vu/unixtoolbox.xhtml#losetup" style="background-color: transparent; color: #000040;">file image partition</a>. The device mapper uses labels to identify a partition. We use <code style="color: #003300;">sdc1</code> in this example, but it could be any string.<h3 id="wluks" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
dm-crypt with LUKS</h3>
LUKS with dm-crypt has better encryption and makes it possible to have multiple passphrase for the same partition or to change the password easily. To test if LUKS is available, simply type <code style="color: #003300;"># cryptsetup --help</code>, if nothing about LUKS shows up, use the instructions below <a href="http://cb.vu/unixtoolbox.xhtml#woluks" style="background-color: transparent; color: #000040;">Without LUKS</a>. First create a partition if necessary: <code style="color: #003300;">fdisk /dev/sdc</code>.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Create encrypted partition</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/urandom of=/dev/sdc1 <span class="cmt" style="background-color: transparent; color: #000040;"># Optional. For paranoids only (takes days)</span>
# cryptsetup -y luksFormat /dev/sdc1 <span class="cmt" style="background-color: transparent; color: #000040;"># This destroys any data on sdc1</span>
# cryptsetup luksOpen /dev/sdc1 sdc1
# mkfs.ext3 /dev/mapper/sdc1 <span class="cmt" style="background-color: transparent; color: #000040;"># create ext3 file system</span>
# mount -t ext3 /dev/mapper/sdc1 /mnt
# umount /mnt
# cryptsetup luksClose sdc1 <span class="cmt" style="background-color: transparent; color: #000040;"># Detach the encrypted partition</span></pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Attach</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cryptsetup luksOpen /dev/sdc1 sdc1
# mount -t ext3 /dev/mapper/sdc1 /mnt</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Detach</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># umount /mnt
# cryptsetup luksClose sdc1
</pre>
<h3 id="woluks" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
dm-crypt without LUKS</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cryptsetup -y create sdc1 /dev/sdc1 <span class="cmt" style="background-color: transparent; color: #000040;"># or any other partition like /dev/loop0</span>
# dmsetup ls <span class="cmt" style="background-color: transparent; color: #000040;"># check it, will display: sdc1 (254, 0)</span>
# mkfs.ext3 /dev/mapper/sdc1 <span class="cmt" style="background-color: transparent; color: #000040;"># This is done only the first time!</span>
# mount -t ext3 /dev/mapper/sdc1 /mnt
# umount /mnt/
# cryptsetup remove sdc1 <span class="cmt" style="background-color: transparent; color: #000040;"># Detach the encrypted partition</span>
</pre>
Do exactly the same (without the mkfs part!) to re-attach the partition. If the password is not correct, the mount command will fail. In this case simply remove the map sdc1 (<code style="color: #003300;">cryptsetup remove sdc1</code>) and create it again.<h2 id="bsdgeli" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
FreeBSD</h2>
The two popular FreeBSD disk encryption modules are <code style="color: #003300;">gbde</code> and <code style="color: #003300;">geli</code>. I now use geli because it is faster and also uses the crypto device for hardware acceleration. See The <a href="http://www.freebsd.org/handbook/disks-encrypting.html" style="background-color: transparent; color: #000040;">FreeBSD handbook Chapter 18.6</a> for all the details. The geli module must be loaded or compiled into the kernel:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">options GEOM_ELI
device crypto <span class="cmt" style="background-color: transparent; color: #000040;"># or as module:</span>
# echo 'geom_eli_load="YES"' >> /boot/loader.conf <span class="cmt" style="background-color: transparent; color: #000040;"># or do: kldload geom_eli</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Use password and key</h3>
I use those settings for a typical disk encryption, it uses a passphrase AND a key to encrypt the master key. That is you need both the password and the generated key <code style="color: #003300;">/root/ad1.key</code> to attach the partition. The master key is stored inside the partition and is not visible. See below for typical USB or file based image.<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Create encrypted partition</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/random of=/root/ad1.key bs=64 count=1 <span class="cmt" style="background-color: transparent; color: #000040;"># this key encrypts the mater key</span>
# geli init -s 4096 -K /root/ad1.key /dev/ad1 <span class="cmt" style="background-color: transparent; color: #000040;"># -s 8192 is also OK for disks</span>
# geli attach -k /root/ad1.key /dev/ad1 <span class="cmt" style="background-color: transparent; color: #000040;"># DO make a backup of /root/ad1.key</span>
# dd if=/dev/random of=/dev/ad1.eli bs=1m <span class="cmt" style="background-color: transparent; color: #000040;"># Optional and takes a long time</span>
# newfs /dev/ad1.eli <span class="cmt" style="background-color: transparent; color: #000040;"># Create file system</span>
# mount /dev/ad1.eli /mnt
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Attach</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># geli attach -k /root/ad1.key /dev/ad1
# fsck -ny -t ffs /dev/ad1.eli <span class="cmt" style="background-color: transparent; color: #000040;"># In doubt check the file system</span>
# mount /dev/ad1.eli /mnt
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Detach</h4>
The detach procedure is done automatically on shutdown.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># umount /mnt
# geli detach /dev/ad1.eli
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
/etc/fstab</h4>
The encrypted partition can be configured to be mounted with /etc/fstab. The password will be prompted when booting. The following settings are required for this example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># grep geli /etc/rc.conf
geli_devices="ad1"
geli_ad1_flags="-k /root/ad1.key"
# grep geli /etc/fstab
/dev/ad1.eli /home/private ufs rw 0 0
</pre>
<h3 id="bsdpwd" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Use password only</h3>
It is more convenient to encrypt a USB stick or file based image with a passphrase only and no key. In this case it is not necessary to carry the additional key file around. The procedure is very much the same as above, simply without the key file. Let's encrypt a file based image <code style="color: #003300;">/cryptedfile</code> of 1 GB.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/zero of=/cryptedfile bs=1M count=1000 <span class="cmt" style="background-color: transparent; color: #000040;"># 1 GB file</span>
# mdconfig -at vnode -f /cryptedfile
# geli init /dev/md0 <span class="cmt" style="background-color: transparent; color: #000040;"># encrypts with password only</span>
# geli attach /dev/md0
# newfs -U -m 0 /dev/md0.eli
# mount /dev/md0.eli /mnt
# umount /dev/md0.eli
# geli detach md0.eli
</pre>
It is now possible to mount this image on an other system with the password only.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mdconfig -at vnode -f /cryptedfile
# geli attach /dev/md0
# mount /dev/md0.eli /mnt
</pre>
</div>
<h2 id="osxcrypt" style="background-color: white; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
OS X Encrypted Disk Image</h2>
<span style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">Don't know by command line only. See </span><a href="https://wiki.thayer.dartmouth.edu/display/computing/Creating+a+Mac+OS+X+Encrypted+Disk+Image" style="background-color: white; color: #000040; font-family: verdana, arial, sans-serif; font-size: 14px;">OS X Encrypted Disk Image</a><span style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;"> and </span><a href="http://support.apple.com/kb/ht1578" style="background-color: white; color: #000040; font-family: verdana, arial, sans-serif; font-size: 14px;">Apple support</a><span style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;"></span><div id="certs" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">SSL CERTIFICATES</a></h1>
So called SSL/TLS certificates are cryptographic public key certificates and are composed of a public and a private key. The certificates are used to authenticate the endpoints and encrypt the data. They are used for example on a web server (https) or mail server (imaps).<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Procedure</h2>
<ul>
<li>We need a certificate authority to sign our certificate. This step is usually provided by a vendor like Thawte, Verisign, etc., however we can also create our own.</li>
<li>Create a certificate signing request. This request is like an unsigned certificate (the public part) and already contains all necessary information. The certificate request is normally sent to the authority vendor for signing. This step also creates the private key on the local machine.</li>
<li>Sign the certificate with the certificate authority.</li>
<li>If necessary join the certificate and the key in a single file to be used by the application (web server, mail server etc.).</li>
</ul>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Configure OpenSSL</h2>
We use /usr/local/certs as directory for this example check or edit /etc/ssl/openssl.cnf accordingly to your settings so you know where the files will be created. Here are the relevant part of openssl.cnf:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">[ CA_default ]
dir = /usr/local/certs/CA <span class="cmt" style="background-color: transparent; color: #000040;"># Where everything is kept</span>
certs = $dir/certs <span class="cmt" style="background-color: transparent; color: #000040;"># Where the issued certs are kept</span>
crl_dir = $dir/crl <span class="cmt" style="background-color: transparent; color: #000040;"># Where the issued crl are kept</span>
database = $dir/index.txt <span class="cmt" style="background-color: transparent; color: #000040;"># database index file.</span>
</pre>
Make sure the directories exist or create them<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mkdir -p /usr/local/certs/CA
# cd /usr/local/certs/CA
# mkdir certs crl newcerts private
# echo "01" > serial <span class="cmt" style="background-color: transparent; color: #000040;"># Only if serial does not exist</span>
# touch index.txt
</pre>
If you intend to get a signed certificate from a vendor, you only need a certificate signing request (CSR). This CSR will then be signed by the vendor for a limited time (e.g. 1 year).<h2 id="createca" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Create a certificate authority</h2>
If you do not have a certificate authority from a vendor, you'll have to create your own. This step is not necessary if one intend to use a vendor to sign the request. To make a certificate authority (CA):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># openssl req -new -x509 -days 730 -config /etc/ssl/openssl.cnf \
-keyout CA/private/cakey.pem -out CA/cacert.pem
</pre>
<h2 id="createreq" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Create a certificate signing request</h2>
To make a new certificate (for mail server or web server for example), first create a request certificate with its private key. If your application do not support encrypted private key (for example UW-IMAP does not), then disable encryption with <code style="color: #003300;">-nodes</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># openssl req -new -keyout newkey.pem -out newreq.pem \
-config /etc/ssl/openssl.cnf
# openssl req -nodes -new -keyout newkey.pem -out newreq.pem \
-config /etc/ssl/openssl.cnf <span class="cmt" style="background-color: transparent; color: #000040;"># No encryption for the key</span>
</pre>
Keep this created CSR (<code style="color: #003300;">newreq.pem</code>) as it can be signed again at the next renewal, the signature onlt will limit the validity of the certificate. This process also created the private key <code style="color: #003300;">newkey.pem</code>.<h2 id="signcert" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Sign the certificate</h2>
The certificate request has to be signed by the CA to be valid, this step is usually done by the vendor. <i>Note: replace "servername" with the name of your server in the next commands</i>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat newreq.pem newkey.pem > new.pem
# openssl ca -policy policy_anything -out servernamecert.pem \
-config /etc/ssl/openssl.cnf -infiles new.pem
# mv newkey.pem servernamekey.pem
</pre>
Now servernamekey.pem is the private key and servernamecert.pem is the server certificate.<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Create united certificate</h2>
The IMAP server wants to have both private key and server certificate in the same file. And in general, this is also easier to handle, but the file has to be kept securely!. Apache also can deal with it well. Create a file servername.pem containing both the certificate and key.<ul>
<li>Open the private key (servernamekey.pem) with a text editor and copy the private key into the "servername.pem" file.</li>
<li>Do the same with the server certificate (servernamecert.pem).</li>
</ul>
The final servername.pem file should look like this:<br /><br /><pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDutWy+o/XZ/[...]qK5LqQgT3c9dU6fcR+WuSs6aejdEDDqBRQ
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIERzCCA7CgAwIBAgIBBDANB[...]iG9w0BAQQFADCBxTELMAkGA1UEBhMCREUx
-----END CERTIFICATE-----
</pre>
What we have now in the directory /usr/local/certs/:<ul style="list-style-type: none;">
<li>CA/private/cakey.pem <i>(CA server private key)</i></li>
<li>CA/cacert.pem <i>(CA server public key)</i></li>
<li>certs/servernamekey.pem <i>(server private key)</i></li>
<li>certs/servernamecert.pem <i>(server signed certificate)</i></li>
<li>certs/servername.pem <i>(server certificate with private key)</i></li>
</ul>
Keep the private key secure!<h2 id="viewcert" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
View certificate information</h2>
To view the certificate information simply do:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># openssl x509 -text -in servernamecert.pem <span class="cmt" style="background-color: transparent; color: #000040;"># View the certificate info</span>
# openssl req -noout -text -in server.csr <span class="cmt" style="background-color: transparent; color: #000040;"># View the request info</span>
# openssl s_client -connect cb.vu:443 <span class="cmt" style="background-color: transparent; color: #000040;"># Check a web server certificate</span>
</pre>
</div>
<div id="cvs" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">CVS</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#cvssetup" style="background-color: transparent; color: #000040;">Server setup</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#cvstest" style="background-color: transparent; color: #000040;">CVS test</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#cvsssh" style="background-color: transparent; color: #000040;">SSH tunneling</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#cvsusage" style="background-color: transparent; color: #000040;">CVS usage</a></div>
<h2 id="cvssetup" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Server setup</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Initiate the CVS</h3>
Decide where the main repository will rest and create a root cvs. For example /usr/local/cvs (as root):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mkdir -p /usr/local/cvs
# setenv CVSROOT /usr/local/cvs <span class="cmt" style="background-color: transparent; color: #000040;"># Set CVSROOT to the new location (local)</span>
# cvs init <span class="cmt" style="background-color: transparent; color: #000040;"># Creates all internal CVS config files</span>
# cd /root
# cvs checkout CVSROOT <span class="cmt" style="background-color: transparent; color: #000040;"># Checkout the config files to modify them</span>
# cd CVSROOT
edit config ( fine as it is)
# cvs commit config
cat >> writers <span class="cmt" style="background-color: transparent; color: #000040;"># Create a writers file (optionally also readers)</span>
colin
^D <span class="cmt" style="background-color: transparent; color: #000040;"># Use [Control][D] to quit the edit</span>
# cvs add writers <span class="cmt" style="background-color: transparent; color: #000040;"># Add the file writers into the repository</span>
# cvs edit checkoutlist
# cat >> checkoutlist
writers
^D <span class="cmt" style="background-color: transparent; color: #000040;"># Use [Control][D] to quit the edit</span>
# cvs commit <span class="cmt" style="background-color: transparent; color: #000040;"># Commit all the configuration changes</span>
</pre>
Add a <strong>readers</strong> file if you want to differentiate read and write permissions <i>Note:</i> Do not (ever) edit files directly into the main cvs, but rather checkout the file, modify it and check it in. We did this with the file <strong>writers</strong> to define the write access.<br />There are three popular ways to access the CVS at this point. The first two don't need any further configuration. See the examples on <a href="http://cb.vu/unixtoolbox.xhtml#cvsroot" style="background-color: transparent; color: #000040;">CVSROOT</a> below for how to use them:<ul>
<li>Direct local access to the file system. The user(s) need sufficient file permission to access the CS directly and there is no further authentication in addition to the OS login. However this is only useful if the repository is local.</li>
<li>Remote access with ssh with the ext protocol. Any use with an ssh shell account and read/write permissions on the CVS server can access the CVS directly with ext over ssh without any additional tunnel. There is no server process running on the CVS for this to work. The ssh login does the authentication.</li>
<li>Remote access with pserver (default port: 2401/tcp). This is the preferred use for larger user base as the users are authenticated by the CVS pserver with a dedicated password database, there is therefore no need for local users accounts. This setup is explained below.</li>
</ul>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Network setup with inetd</h3>
The CVS can be run locally only if a network access is not needed. For a remote access, the daemon inetd can start the pserver with the following line in /etc/inetd.conf (/etc/xinetd.d/cvs on SuSE):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">cvspserver stream tcp nowait cvs /usr/bin/cvs cvs \
--allow-root=/usr/local/cvs pserver
</pre>
It is a good idea to block the cvs port from the Internet with the firewall and use an ssh tunnel to access the repository remotely.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Separate authentication</h3>
It is possible to have cvs users which are not part of the OS (no local users). This is actually probably wanted too from the security point of view. Simply add a file named <strong>passwd</strong> (in the CVSROOT directory) containing the users login and password in the crypt format. This is can be done with the apache htpasswd tool.<br /><i>Note:</i> This passwd file is the only file which has to be edited directly in the CVSROOT directory. Also it won't be checked out. More info with htpasswd --help<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># htpasswd -cb passwd user1 password1 <span class="cmt" style="background-color: transparent; color: #000040;"># -c creates the file</span>
# htpasswd -b passwd user2 password2
</pre>
Now add <code style="color: #003300;">:cvs</code> at the end of each line to tell the cvs server to change the user to cvs (or whatever your cvs server is running under). It looks like this:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cat passwd
user1:xsFjhU22u8Fuo:cvs
user2:vnefJOsnnvToM:cvs
</pre>
<h2 id="cvstest" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Test it</h2>
Test the login as normal user (for example here me)<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cvs -d :pserver:colin@192.168.50.254:/usr/local/cvs login
Logging in to :pserver:colin@192.168.50.254:2401/usr/local/cvs
CVS password:
</pre>
<h3 id="cvsroot" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
CVSROOT variable</h3>
This is an environment variable used to specify the location of the repository we're doing operations on. For local use, it can be just set to the directory of the repository. For use over the network, the transport protocol must be specified. Set the CVSROOT variable with <code style="color: #003300;">setenv CVSROOT string</code> on a csh, tcsh shell, or with<code style="color: #003300;">export CVSROOT=string</code> on a sh, bash shell.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># setenv CVSROOT :pserver:<username>@<host>:/cvsdirectory
<i><span class="cmt" style="background-color: transparent; color: #000040;">For example:</span></i>
# setenv CVSROOT /usr/local/cvs <span class="cmt" style="background-color: transparent; color: #000040;"># Used locally only</span>
# setenv CVSROOT :local:/usr/local/cvs <span class="cmt" style="background-color: transparent; color: #000040;"># Same as above</span>
# setenv CVSROOT :ext:user@cvsserver:/usr/local/cvs <span class="cmt" style="background-color: transparent; color: #000040;"># Direct access with SSH</span>
# setenv CVS_RSH ssh <span class="cmt" style="background-color: transparent; color: #000040;"># for the ext access</span>
# setenv CVSROOT :pserver:user@cvsserver.254:/usr/local/cvs <span class="cmt" style="background-color: transparent; color: #000040;"># network with pserver</span>
</pre>
When the login succeeded one can import a new project into the repository: <strong>cd into</strong> your project root directory<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">cvs import <module name> <vendor tag> <initial tag>
cvs -d :pserver:colin@192.168.50.254:/usr/local/cvs import MyProject MyCompany START
</pre>
Where MyProject is the name of the new project in the repository (used later to checkout). Cvs will import the current directory content into the new project.<br /><br />To checkout:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cvs -d :pserver:colin@192.168.50.254:/usr/local/cvs checkout MyProject
<i><span class="cmt" style="background-color: transparent; color: #000040;">or</span></i>
# setenv CVSROOT :pserver:colin@192.168.50.254:/usr/local/cvs
# cvs checkout MyProject
</pre>
<h2 id="cvsssh" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
SSH tunneling for CVS</h2>
We need 2 shells for this. On the first shell we connect to the cvs server with ssh and port-forward the cvs connection. On the second shell we use the cvs normally as if it where running locally.<br />on shell 1:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ssh -L2401:localhost:2401 colin@cvs_server <span class="cmt" style="background-color: transparent; color: #000040;"># Connect directly to the CVS server. Or:</span>
# ssh -L2401:cvs_server:2401 colin@gateway <span class="cmt" style="background-color: transparent; color: #000040;"># Use a gateway to reach the CVS</span></pre>
on shell 2:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># setenv CVSROOT :pserver:colin@localhost:/usr/local/cvs
# cvs login
Logging in to :pserver:colin@localhost:2401/usr/local/cvs
CVS password:
# cvs checkout MyProject/src
</pre>
<h2 id="cvsusage" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
CVS commands and usage</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Import</h3>
The import command is used to add a whole directory, it must be run from within the directory to be imported. Say the directory /devel/ contains all files and subdirectories to be imported. The directory name on the CVS (the module) will be called "myapp".<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cvs import [options] directory-name vendor-tag release-tag
# cd /devel <span class="cmt" style="background-color: transparent; color: #000040;"># Must be inside the project to import it</span>
# cvs import myapp Company R1_0 <span class="cmt" style="background-color: transparent; color: #000040;"># Release tag can be anything in one word</span>
</pre>
After a while a new directory "/devel/tools/" was added and it has to be imported too.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd /devel/tools
# cvs import myapp/tools Company R1_0
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Checkout update add commit</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cvs co myapp/tools <span class="cmt" style="background-color: transparent; color: #000040;"># Will only checkout the directory tools</span>
# cvs co -r R1_1 myapp <span class="cmt" style="background-color: transparent; color: #000040;"># Checkout myapp at release R1_1 (is sticky)</span>
# cvs -q -d update -P <span class="cmt" style="background-color: transparent; color: #000040;"># A typical CVS update</span>
# cvs update -A <span class="cmt" style="background-color: transparent; color: #000040;"># Reset any sticky tag (or date, option)</span>
# cvs add newfile <span class="cmt" style="background-color: transparent; color: #000040;"># Add a new file</span>
# cvs add -kb newfile <span class="cmt" style="background-color: transparent; color: #000040;"># Add a new binary file</span>
# cvs commit file1 file2 <span class="cmt" style="background-color: transparent; color: #000040;"># Commit the two files only</span>
# cvs commit -m "message" <span class="cmt" style="background-color: transparent; color: #000040;"># Commit all changes done with a message</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Create a patch</h3>
It is best to create and apply a patch from the working development directory related to the project, or from within the source directory.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd /devel/project
# diff -Naur olddir newdir > patchfile <span class="cmt" style="background-color: transparent; color: #000040;"># Create a patch from a directory or a file</span>
# diff -Naur oldfile newfile > patchfile
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Apply a patch</h3>
Sometimes it is necessary to strip a directory level from the patch, depending how it was created. In case of difficulties, simply look at the first lines of the patch and try -p0, -p1 or -p2.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd /devel/project
# patch --dry-run -p0 < patchfile <span class="cmt" style="background-color: transparent; color: #000040;"># Test the path without applying it</span>
# patch -p0 < patchfile
# patch -p1 < patchfile <span class="cmt" style="background-color: transparent; color: #000040;"># strip off the 1st level from the path</span>
</pre>
</div>
<div id="svn" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">SVN</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#svnsetup" style="background-color: transparent; color: #000040;">Server setup</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#svnssh" style="background-color: transparent; color: #000040;">SVN+SSH</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#svnhttp" style="background-color: transparent; color: #000040;">SVN over http</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#svnusage" style="background-color: transparent; color: #000040;">SVN usage</a></div>
<a href="http://subversion.tigris.org/" style="background-color: transparent; color: #000040;">Subversion (SVN)</a> is a version control system designed to be the successor of CVS (Concurrent Versions System). The concept is similar to CVS, but many shortcomings where improved. See also the <a href="http://svnbook.red-bean.com/en/1.4/" style="background-color: transparent; color: #000040;">SVN book</a>.<h2 id="svnsetup" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Server setup</h2>
The initiation of the repository is fairly simple (here for example <code style="color: #003300;">/home/svn/</code> must exist):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># svnadmin create --fs-type fsfs /home/svn/project1</pre>
Now the access to the repository is made possible with:<ul>
<li><code style="color: #003300;">file://</code> Direct file system access with the svn client with. This requires local permissions on the file system.</li>
<li><code style="color: #003300;">svn://</code> or <code style="color: #003300;">svn+ssh://</code> Remote access with the svnserve server (also over SSH). This requires local permissions on the file system (default port: 2690/tcp).</li>
<li><code style="color: #003300;">http://</code> Remote access with webdav using apache. No local users are necessary for this method.</li>
</ul>
Using the local file system, it is now possible to import and then check out an existing project. Unlike with CVS it is not necessary to cd into the project directory, simply give the full path:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># svn import /project1/ file:///home/svn/project1/trunk -m 'Initial import'
# svn checkout file:///home/svn/project1
</pre>
The new directory "trunk" is only a convention, this is not required.<h3 id="svnssh" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Remote access with ssh</h3>
No special setup is required to access the repository via ssh, simply replace <code style="color: #003300;">file://</code> with <code style="color: #003300;">svn+ssh/hostname</code>. For example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># svn checkout svn+ssh://hostname/home/svn/project1</pre>
As with the local file access, every user needs an ssh access to the server (with a local account) and also read/write access. This method might be suitable for a small group. All users could belong to a subversion group which owns the repository, for example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># groupadd subversion
# groupmod -A user1 subversion
# chown -R root:subversion /home/svn
# chmod -R 770 /home/svn
</pre>
<h3 id="svnhttp" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Remote access with http (apache)</h3>
Remote access over http (https) is the only good solution for a larger user group. This method uses the apache authentication, not the local accounts. This is a typical but small apache configuration:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so <span class="cmt" style="background-color: transparent; color: #000040;"> # Only for access control</span>
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"><Location /svn>
DAV svn
<span class="cmt" style="background-color: transparent; color: #000040;"># any "/svn/foo" URL will map to a repository /home/svn/foo</span>
SVNParentPath /home/svn
AuthType Basic
AuthName "Subversion repository"
AuthzSVNAccessFile /etc/apache2/svn.acl
AuthUserFile /etc/apache2/svn-passwd
Require valid-user
</Location>
</pre>
The apache server needs full access to the repository:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># chown -R www:www /home/svn</pre>
Create a user with htpasswd2:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># htpasswd -c /etc/svn-passwd user1 <span class="cmt" style="background-color: transparent; color: #000040;"> # -c creates the file</span></pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Access control svn.acl example</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;"># Default it read access. "* =" would be default no access</span>
[/]
* = r
[groups]
project1-developers = joe, jack, jane
<span class="cmt" style="background-color: transparent; color: #000040;"># Give write access to the developers</span>
[project1:]
@project1-developers = rw
</pre>
<h2 id="svnusage" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
SVN commands and usage</h2>
See also the <a href="http://www.cs.put.poznan.pl/csobaniec/Papers/svn-refcard.pdf" rel="nofollow" style="background-color: transparent; color: #000040;">Subversion Quick Reference Card</a>. <a href="http://tortoisesvn.tigris.org/" style="background-color: transparent; color: #000040;">Tortoise SVN</a> is a nice Windows interface.<h3 id="svnimport" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Import</h3>
A new project, that is a directory with some files, is imported into the repository with the <code style="color: #003300;">import</code> command. Import is also used to add a directory with its content to an existing project.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># svn help import <span class="cmt" style="background-color: transparent; color: #000040;"> # Get help for any command</span>
<span class="cmt" style="background-color: transparent; color: #000040;"> # Add a new directory (with content) into the src dir on project1</span>
# svn import /project1/newdir http://host.url/svn/project1/trunk/src -m 'add newdir'
</pre>
<h3 id="svntypical" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Typical SVN commands</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># svn co http://host.url/svn/project1/trunk <span class="cmt" style="background-color: transparent; color: #000040;"> # Checkout the most recent version</span>
<span class="cmt" style="background-color: transparent; color: #000040;"> # Tags and branches are created by copying</span>
# svn mkdir http://host.url/svn/project1/tags/ <span class="cmt" style="background-color: transparent; color: #000040;"> # Create the tags directory</span>
# svn copy -m "Tag rc1 rel." http://host.url/svn/project1/trunk \
http://host.url/svn/project1/tags/1.0rc1
# svn status [--verbose] <span class="cmt" style="background-color: transparent; color: #000040;"> # Check files status into working dir</span>
# svn add src/file.h src/file.cpp <span class="cmt" style="background-color: transparent; color: #000040;"> # Add two files</span>
# svn commit -m 'Added new class file' <span class="cmt" style="background-color: transparent; color: #000040;"> # Commit the changes with a message</span>
# svn ls http://host.url/svn/project1/tags/ <span class="cmt" style="background-color: transparent; color: #000040;"> # List all tags</span>
# svn move foo.c bar.c <span class="cmt" style="background-color: transparent; color: #000040;"> # Move (rename) files</span>
# svn delete some_old_file <span class="cmt" style="background-color: transparent; color: #000040;"> # Delete files</span>
</pre>
</div>
<div id="other" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">USEFUL COMMANDS</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#less" style="background-color: transparent; color: #000040;">less</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#vi" style="background-color: transparent; color: #000040;">vi</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#mail" style="background-color: transparent; color: #000040;">mail</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#tar" style="background-color: transparent; color: #000040;">tar</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#zip" style="background-color: transparent; color: #000040;">zip</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#dd" style="background-color: transparent; color: #000040;">dd</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#screen" style="background-color: transparent; color: #000040;">screen</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#find" style="background-color: transparent; color: #000040;">find</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#misccmd" style="background-color: transparent; color: #000040;">Miscellaneous</a></div>
<h2 id="less" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
less</h2>
The <code style="color: #003300;">less</code> command displays a text document on the console. It is present on most installation.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># less unixtoolbox.xhtml</pre>
Some important commands are (^N stands for [control]-[N]):<ul style="list-style-type: none;">
<li><strong>h H</strong> good help on display</li>
<li><strong>f ^F ^V SPACE</strong> Forward one window (or N lines).</li>
<li><strong>b ^B ESC-v</strong> Backward one window (or N lines).</li>
<li><strong>F</strong> Forward forever; like "tail -f".</li>
<li><strong>/pattern</strong> Search forward for (N-th) matching line.</li>
<li><strong>?pattern</strong> Search backward for (N-th) matching line.</li>
<li><strong>n</strong> Repeat previous search (for N-th occurrence).</li>
<li><strong>N</strong> Repeat previous search in reverse direction.</li>
<li><strong>q</strong> quit</li>
</ul>
<h2 id="vi" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
vi</h2>
Vi is present on ANY Linux/Unix installation (not gentoo?) and it is therefore useful to know some basic commands. There are two modes: command mode and insertion mode. The commands mode is accessed with <strong>[ESC]</strong>, the insertion mode with <strong>i</strong>. Use <code style="color: #003300;">: help</code> if you are lost.<br />The editors <code style="color: #003300;">nano</code> and <code style="color: #003300;">pico</code> are usually available too and are easier (IMHO) to use.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Quit</h3>
<ul style="list-style-type: none;">
<li><strong>:w</strong> newfilename save the file to newfilename</li>
<li><strong>:wq or :x</strong> save and quit</li>
<li><strong>:q!</strong> quit without saving</li>
</ul>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Search and move</h3>
<ul style="list-style-type: none;">
<li><strong>/string</strong> Search forward for string</li>
<li><strong>?string</strong> Search back for string</li>
<li><strong>n</strong> Search for next instance of string</li>
<li><strong>N</strong> Search for previous instance of string</li>
<li><strong>{</strong> Move a paragraph back</li>
<li><strong>}</strong> Move a paragraph forward</li>
<li><strong>1G</strong> Move to the first line of the file</li>
<li><strong>nG</strong> Move to the n th line of the file</li>
<li><strong>G</strong> Move to the last line of the file</li>
<li><strong>:%s/OLD/NEW/g</strong> Search and replace every occurrence</li>
</ul>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Delete copy paste text</h3>
<ul style="list-style-type: none;">
<li><strong>dd (dw)</strong> Cut current line (word)</li>
<li><strong>D</strong> Cut to the end of the line</li>
<li><strong>x</strong> Delete (cut) character</li>
<li><strong>yy (yw)</strong> Copy line (word) after cursor</li>
<li><strong>P</strong> Paste after cursor</li>
<li><strong>u</strong> Undo last modification</li>
<li><strong>U</strong> Undo all changes to current line</li>
</ul>
<h2 id="mail" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
mail</h2>
The <code style="color: #003300;">mail</code> command is a basic application to read and send email, it is usually installed. To send an email simply type "mail user@domain". The first line is the subject, then the mail content. Terminate and send the email with a single dot (.) in a new line. Example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mail c@cb.vu
Subject: Your text is full of typos
"For a moment, nothing happened. Then, after a second or so,
nothing continued to happen."
.
EOT
#
</pre>
This is also working with a pipe:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># echo "This is the mail body" | mail c@cb.vu</pre>
This is also a simple way to test the mail server.<h2 id="tar" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
tar</h2>
The command <code style="color: #003300;">tar</code> (tape archive) creates and extracts archives of file and directories. The archive .tar is uncompressed, a compressed archive has the extension .tgz or .tar.gz (zip) or .tbz (bzip2). Do not use absolute path when creating an archive, you probably want to unpack it somewhere else. Some typical commands are:<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Create</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cd /
# tar -cf home.tar home/ <span class="cmt" style="background-color: transparent; color: #000040;"># archive the whole /home directory (c for create)</span>
# tar -czf home.tgz home/ <span class="cmt" style="background-color: transparent; color: #000040;"># same with zip compression</span>
# tar -cjf home.tbz home/ <span class="cmt" style="background-color: transparent; color: #000040;"># same with bzip2 compression</span>
</pre>
Only include one (or two) directories from a tree, but keep the relative structure. For example archive /usr/local/etc and /usr/local/www and the first directory in the archive should be local/.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tar -C /usr -czf local.tgz local/etc local/www
# tar -C /usr -xzf local.tgz <span class="cmt" style="background-color: transparent; color: #000040;"># To untar the local dir into /usr</span>
# cd /usr; tar -xzf local.tgz <span class="cmt" style="background-color: transparent; color: #000040;"># Is the same as above</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Extract</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tar -tzf home.tgz <span class="cmt" style="background-color: transparent; color: #000040;"># look inside the archive without extracting (list)</span>
# tar -xf home.tar <span class="cmt" style="background-color: transparent; color: #000040;"># extract the archive here (x for extract)</span>
# tar -xzf home.tgz <span class="cmt" style="background-color: transparent; color: #000040;"># same with zip compression (-xjf for bzip2 compression)</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># remove leading path gallery2 and extract into gallery</span>
# tar --strip-components 1 -zxvf gallery2.tgz -C gallery/
# tar -xjf home.tbz home/colin/file.txt <span class="cmt" style="background-color: transparent; color: #000040;"># Restore a single file</span>
# tar -xOf home.tbz home/colin/file.txt <span class="cmt" style="background-color: transparent; color: #000040;"># Print file to stdout (no extraction)</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
More advanced</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tar c dir/ | gzip | ssh user@remote 'dd of=dir.tgz' <span class="cmt" style="background-color: transparent; color: #000040;"># arch dir/ and store remotely.</span>
# tar cvf - `find . -print` > backup.tar <span class="cmt" style="background-color: transparent; color: #000040;"># arch the current directory.</span>
# tar -cf - -C /etc . | tar xpf - -C /backup/etc <span class="cmt" style="background-color: transparent; color: #000040;"># Copy directories</span>
# tar -cf - -C /etc . | ssh user@remote tar xpf - -C /backup/etc <span class="cmt" style="background-color: transparent; color: #000040;"># Remote copy.</span>
# tar -czf home.tgz --exclude '*.o' --exclude 'tmp/' home/
</pre>
<h2 id="zip" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
zip/unzip</h2>
Zip files can be easier to share with Windows.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># zip -r fileName.zip /path/to/dir <span class="cmt" style="background-color: transparent; color: #000040;"># zip dir into file fileName.zip</span>
# unzip fileName.zip <span class="cmt" style="background-color: transparent; color: #000040;"># uncompress zip file</span>
# unzip -l fileName.zip <span class="cmt" style="background-color: transparent; color: #000040;"># list files inside archive</span>
# unzip -c fileName.zip fileinside.txt <span class="cmt" style="background-color: transparent; color: #000040;"># print one file to stdout (no extraction)</span>
# unzip fileName.zip fileinside.txt <span class="cmt" style="background-color: transparent; color: #000040;"># extract one file only</span>
</pre>
<h2 id="dd" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
dd</h2>
The program <code style="color: #003300;">dd</code> (disk dump or destroy disk or see <a href="http://roesler-ac.de/wolfram/acro/credits.htm" style="background-color: transparent; color: #000040;">the meaning of dd</a>) is used to copy partitions and disks and for other copy tricks. Typical usage:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=<source> of=<target> bs=<byte size> conv=<conversion>
# kill -INFO PID <span class="cmt" style="background-color: transparent; color: #000040;"># View dd progress (FreeBSD, OSX)</span>
</pre>
Important conv options:<ul style="list-style-type: none;">
<li><code style="color: #003300;">notrunc</code> do not truncate the output file, all zeros will be written as zeros.</li>
<li><code style="color: #003300;">noerror</code> continue after read errors (e.g. bad blocks)</li>
<li><code style="color: #003300;">sync</code> pad every input block with Nulls to ibs-size</li>
</ul>
The default byte size is 512 (one block). The MBR, where the partition table is located, is on the first block, the first 63 blocks of a disk are empty. Larger byte sizes are faster to copy but require also more memory.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Backup and restore</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/hda of=/dev/hdc bs=16065b <span class="cmt" style="background-color: transparent; color: #000040;"># Copy disk to disk (same size)</span>
# dd if=/dev/sda7 of=/home/root.img bs=4096 conv=notrunc,noerror <span class="cmt" style="background-color: transparent; color: #000040;"># Backup /</span>
# dd if=/home/root.img of=/dev/sda7 bs=4096 conv=notrunc,noerror <span class="cmt" style="background-color: transparent; color: #000040;"># Restore /</span>
# dd bs=1M if=/dev/ad4s3e | gzip -c > ad4s3e.gz <span class="cmt" style="background-color: transparent; color: #000040;"># Zip the backup</span>
# gunzip -dc ad4s3e.gz | dd of=/dev/ad0s3e bs=1M <span class="cmt" style="background-color: transparent; color: #000040;"># Restore the zip</span>
# dd bs=1M if=/dev/ad4s3e | gzip | ssh eedcoba@fry 'dd of=ad4s3e.gz' <span class="cmt" style="background-color: transparent; color: #000040;"># also remote</span>
# gunzip -dc ad4s3e.gz | ssh eedcoba@host 'dd of=/dev/ad0s3e bs=1M'
# dd if=/dev/ad0 of=/dev/ad2 skip=1 seek=1 bs=4k conv=noerror <span class="cmt" style="background-color: transparent; color: #000040;"># Skip MBR</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># This is necessary if the destination (ad2) is smaller.</span>
# dd if=/vm/FreeBSD-8.2-RELEASE-amd64-memstick.img of=/dev/disk1 bs=10240 conv=sync
<span class="cmt" style="background-color: transparent; color: #000040;"># Copy FreeBSD image to USB memory stick</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Recover</h3>
The command <code style="color: #003300;">dd</code> will read <i>every single block</i> of the partition. In case of problems it is better to use the option <code style="color: #003300;">conv=sync,noerror</code> so dd will skip the bad block and write zeros at the destination. Accordingly it is important to set the block size equal or smaller than the disk block size. A 1k size seems safe, set it with <code style="color: #003300;">bs=1k</code>. If a disk has bad sectors and the data should be recovered from a partition, create an image file with dd, mount the image and copy the content to a new disk. With the option <code style="color: #003300;">noerror</code>, dd will skip the bad sectors and write zeros instead, thus only the data contained in the bad sectors will be lost.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/hda of=/dev/null bs=1m <span class="cmt" style="background-color: transparent; color: #000040;"># Check for bad blocks</span>
# dd bs=1k if=/dev/hda1 conv=sync,noerror,notrunc | gzip | ssh \ <span class="cmt" style="background-color: transparent; color: #000040;"># Send to remote</span>
root@fry 'dd of=hda1.gz bs=1k'
# dd bs=1k if=/dev/hda1 conv=sync,noerror,notrunc of=hda1.img <span class="cmt" style="background-color: transparent; color: #000040;"># Store into an image</span>
# mount -o loop /hda1.img /mnt <span class="cmt" style="background-color: transparent; color: #000040;"># <a class="xref" href="http://cb.vu/unixtoolbox.xhtml#createimg" style="background-color: transparent; color: #000040;">Mount the image</a></span>
# rsync -ax /mnt/ /newdisk/ <span class="cmt" style="background-color: transparent; color: #000040;"># Copy on a new disk</span>
# dd if=/dev/hda of=/dev/hda <span class="cmt" style="background-color: transparent; color: #000040;"># Refresh the magnetic state</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># The above is useful to refresh a disk. It is perfectly safe, but must be unmounted.</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Delete</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/zero of=/dev/hdc <span class="cmt" style="background-color: transparent; color: #000040;"># Delete full disk</span>
# dd if=/dev/urandom of=/dev/hdc <span class="cmt" style="background-color: transparent; color: #000040;"># Delete full disk better</span>
# kill -USR1 PID <span class="cmt" style="background-color: transparent; color: #000040;"># View dd progress (Linux)</span>
# kill -INFO PID <span class="cmt" style="background-color: transparent; color: #000040;"># View dd progress (FreeBSD)</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
MBR tricks</h3>
The MBR contains the boot loader and the partition table and is 512 bytes small. The first 446 are for the boot loader, the bytes 446 to 512 are for the partition table.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># dd if=/dev/sda of=/mbr_sda.bak bs=512 count=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Backup the full MBR</span>
# dd if=/dev/zero of=/dev/sda bs=512 count=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Delete MBR and partition table</span>
# dd if=/mbr_sda.bak of=/dev/sda bs=512 count=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Restore the full MBR</span>
# dd if=/mbr_sda.bak of=/dev/sda bs=446 count=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Restore only the boot loader</span>
# dd if=/mbr_sda.bak of=/dev/sda bs=1 count=64 skip=446 seek=446 <span class="cmt" style="background-color: transparent; color: #000040;"># Restore partition table</span>
</pre>
<h2 id="screen" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
screen</h2>
Screen (a must have) has two main functionalities:<ul>
<li>Run multiple terminal session within a single terminal.</li>
<li>A started program is decoupled from the real terminal and can thus run in the background. The real terminal can be closed and reattached later.</li>
</ul>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Short start example</h3>
start screen with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># screen</pre>
Within the screen session we can start a long lasting program (like top).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># top</pre>
Now detach with <strong>Ctrl-a Ctrl-d</strong>. Reattach the terminal with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># screen -R -D</pre>
In detail this means: If a session is running, then reattach. If necessary detach and logout remotely first. If it was not running create it and notify the user. Or:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># screen -x</pre>
Attach to a running screen in a multi display mode. The console is thus shared among multiple users. Very useful for team work/debug!<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Screen commands (within screen)</h3>
All screen commands start with <strong>Ctrl-a</strong>.<ul>
<li><strong>Ctrl-a ?</strong> help and summary of functions</li>
<li><strong>Ctrl-a c</strong> create an new window (terminal)</li>
<li><strong>Ctrl-a Ctrl-n and Ctrl-a Ctrl-p</strong> to switch to the next or previous window in the list, by number.</li>
<li><strong>Ctrl-a Ctrl-N</strong> where N is a number from 0 to 9, to switch to the corresponding window.</li>
<li><strong>Ctrl-a "</strong> to get a navigable list of running windows</li>
<li><strong>Ctrl-a a</strong> to clear a missed Ctrl-a</li>
<li><strong>Ctrl-a Ctrl-d</strong> to disconnect and leave the session running in the background</li>
<li><strong>Ctrl-a x</strong> lock the screen terminal with a password</li>
<li><strong>Ctrl-a [</strong> enter into <strong>scrollback</strong> mode, exit with <strong>esc</strong>.<br />Use <code style="color: #003300;">echo "defscrollback 5000" > ~/.screenrc</code> to increase buffer (default is 100)</li>
<ul>
<li><strong>C-u</strong> Scrolls a half page up</li>
<li><strong>C-b</strong> Scroll a full page up</li>
<li><strong>C-d</strong> Scroll a half page down</li>
<li><strong>C-f</strong> Scroll a full page down</li>
<li><strong>/</strong> Search forward</li>
<li><strong>?</strong> Search backward</li>
</ul>
</ul>
The screen session is terminated when the program within the running terminal is closed and you logout from the terminal.<h2 id="find" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Find</h2>
Some important options:<ul style="list-style-type: none;">
<li><code style="color: #003300;">-x</code> (on BSD) <code style="color: #003300;">-xdev</code> (on Linux) Stay on the same file system (dev in fstab).</li>
<li><code style="color: #003300;">-exec cmd {} \;</code> Execute the command and replace {} with the full path</li>
<li><code style="color: #003300;">-iname</code> Like -name but is case insensitive</li>
<li><code style="color: #003300;">-ls</code> Display information about the file (like ls -la)</li>
<li><code style="color: #003300;">-size n</code> n is +-n (k M G T P)</li>
<li><code style="color: #003300;">-cmin n</code> File's status was last changed n minutes ago.</li>
</ul>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># find . -type f ! -perm -444 <span class="cmt" style="background-color: transparent; color: #000040;"># Find files not readable by all</span>
# find . -type d ! -perm -111 <span class="cmt" style="background-color: transparent; color: #000040;"># Find dirs not accessible by all</span>
# find /home/user/ -cmin 10 -print <span class="cmt" style="background-color: transparent; color: #000040;"># Files created or modified in the last 10 min.</span>
# find . -name '*.[ch]' | xargs grep -E 'expr' <span class="cmt" style="background-color: transparent; color: #000040;"># Search 'expr' in this dir and below.</span>
# find / -name "*.core" | xargs rm <span class="cmt" style="background-color: transparent; color: #000040;"># Find core dumps and delete them (also try core.*)</span>
# find / -name "*.core" -print -exec rm {} \; <span class="cmt" style="background-color: transparent; color: #000040;"># Other syntax</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># Find images and create an archive, iname is not case sensitive. -r for append</span>
# find . \( -iname "*.png" -o -iname "*.jpg" \) -print -exec tar -rf images.tar {} \;
# find . -type f -name "*.txt" ! -name README.txt -print <span class="cmt" style="background-color: transparent; color: #000040;"># Exclude README.txt files</span>
# find /var/ -size +10M -exec ls -lh {} \; <span class="cmt" style="background-color: transparent; color: #000040;"># Find large files > 10 MB</span>
# find /var/ -size +10M -ls <span class="cmt" style="background-color: transparent; color: #000040;"># This is simpler</span>
# find . -size +10M -size -50M -print
# find /usr/ports/ -name work -type d -print -exec rm -rf {} \; <span class="cmt" style="background-color: transparent; color: #000040;"># Clean the ports</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># Find files with SUID; those file are vulnerable and must be kept secure</span>
# find / -type f -user root -perm -4000 -exec ls -l {} \;
# find flac/ -iname *.flac -print -size +500k -exec /Applications/Fluke.app/Contents/MacOS/Fluke {} \;
<span class="cmt" style="background-color: transparent; color: #000040;"># I use above to add flac files to iTunes on OSX</span>
</pre>
Be careful with xarg or exec as it might or might not honor quotings and can return wrong results when files or directories contain spaces. In doubt use "-print0 | xargs -0" instead of "| xargs". The option -print0 must be the last in the find command. See this nice <a href="http://www.hccfl.edu/pollock/Unix/FindCmd.htm" style="background-color: transparent; color: #000040;">mini tutorial for find</a>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># find . -type f | xargs ls -l <span class="cmt" style="background-color: transparent; color: #000040;"># Will not work with spaces in names</span>
# find . -type f -print0 | xargs -0 ls -l <span class="cmt" style="background-color: transparent; color: #000040;"># Will work with spaces in names</span>
# find . -type f -exec ls -l '{}' \; <span class="cmt" style="background-color: transparent; color: #000040;"># Or use quotes '{}' with -exec</span>
</pre>
Duplicate directory tree:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># find . -type d -exec mkdir -p /tmp/new_dest/{} \;</pre>
<h2 id="misccmd" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Miscellaneous</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># which command <span class="cmt" style="background-color: transparent; color: #000040;"># Show full path name of command</span>
# time command <span class="cmt" style="background-color: transparent; color: #000040;"># See how long a command takes to execute</span>
# time cat <span class="cmt" style="background-color: transparent; color: #000040;"># Use time as stopwatch. Ctrl-c to stop</span>
# set | grep $USER <span class="cmt" style="background-color: transparent; color: #000040;"># List the current environment</span>
# cal -3 <span class="cmt" style="background-color: transparent; color: #000040;"># Display a three month calendar</span>
# date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
# date 10022155 <span class="cmt" style="background-color: transparent; color: #000040;"># Set date and time</span>
# whatis grep <span class="cmt" style="background-color: transparent; color: #000040;"># Display a short info on the command or word</span>
# whereis java <span class="cmt" style="background-color: transparent; color: #000040;"># Search path and standard directories for word</span>
# setenv varname value <span class="cmt" style="background-color: transparent; color: #000040;"># Set env. variable varname to value (csh/tcsh)</span>
# export varname="value" <span class="cmt" style="background-color: transparent; color: #000040;"># set env. variable varname to value (sh/ksh/bash)</span>
# pwd <span class="cmt" style="background-color: transparent; color: #000040;"># Print working directory</span>
# mkdir -p /path/to/dir <span class="cmt" style="background-color: transparent; color: #000040;"># no error if existing, make parent dirs as needed</span>
# mkdir -p project/{bin,src,obj,doc/{html,man,pdf},debug/some/more/dirs}
# rmdir /path/to/dir <span class="cmt" style="background-color: transparent; color: #000040;"># Remove directory</span>
# rm -rf /path/to/dir <span class="cmt" style="background-color: transparent; color: #000040;"># Remove directory and its content (force)</span>
# rm -- -badchar.txt <span class="cmt" style="background-color: transparent; color: #000040;"># Remove file whitch starts with a dash (-)</span>
# cp -la /dir1 /dir2 <span class="cmt" style="background-color: transparent; color: #000040;"># Archive and hard link files instead of copy</span>
# cp -lpR /dir1 /dir2 <span class="cmt" style="background-color: transparent; color: #000040;"># Same for FreeBSD</span>
# cp unixtoolbox.xhtml{,.bak} <span class="cmt" style="background-color: transparent; color: #000040;"># Short way to copy the file with a new extension</span>
# mv /dir1 /dir2 <span class="cmt" style="background-color: transparent; color: #000040;"># Rename a directory</span>
# ls -1 <span class="cmt" style="background-color: transparent; color: #000040;"># list one file per line</span>
# history | tail -50 <span class="cmt" style="background-color: transparent; color: #000040;"># Display the last 50 used commands</span>
# cd - <span class="cmt" style="background-color: transparent; color: #000040;"># cd to previous ($OLDPWD) directory</span>
# /bin/ls| grep -v .py | xargs rm -r <span class="cmt" style="background-color: transparent; color: #000040;"># pipe file names to rm with xargs</span>
</pre>
Check file hashes with openssl. This is a nice alternative to the commands <code style="color: #003300;">md5sum</code> or <code style="color: #003300;">sha1sum</code> (FreeBSD uses <code style="color: #003300;">md5</code> and <code style="color: #003300;">sha1</code>) which are not always installed.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># openssl md5 file.tar.gz <span class="cmt" style="background-color: transparent; color: #000040;"># Generate an md5 checksum from file</span>
# openssl sha1 file.tar.gz <span class="cmt" style="background-color: transparent; color: #000040;"># Generate an sha1 checksum from file</span>
# openssl rmd160 file.tar.gz <span class="cmt" style="background-color: transparent; color: #000040;"># Generate a RIPEMD-160 checksum from file</span>
</pre>
</div>
<div id="software" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">INSTALL SOFTWARE</a></h1>
Usually the package manager uses the proxy variable for http/ftp requests. In .bashrc:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">export http_proxy=http://proxy_server:3128
export ftp_proxy=http://proxy_server:3128
</pre>
<h2 id="softwarelist" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
List installed packages</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># rpm -qa <span class="cmt" style="background-color: transparent; color: #000040;"># List installed packages (RH, SuSE, RPM based)</span>
# dpkg -l <span class="cmt" style="background-color: transparent; color: #000040;"># Debian, Ubuntu</span>
# pkg_info <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD list all installed packages</span>
# pkg_info -W smbd <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD show which package smbd belongs to</span>
# pkginfo <span class="cmt" style="background-color: transparent; color: #000040;"># Solaris</span>
</pre>
<h2 id="softwareadd" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Add/remove software</h2>
Front ends: yast2/yast for SuSE, redhat-config-packages for Red Hat.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># rpm -i pkgname.rpm <span class="cmt" style="background-color: transparent; color: #000040;"># install the package (RH, SuSE, RPM based)</span>
# rpm -e pkgname <span class="cmt" style="background-color: transparent; color: #000040;"># Remove package</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
SuSE zypper <a href="http://en.opensuse.org/SDB:Zypper_usage" style="background-color: transparent; color: #000040;">(see doc and cheet sheet)</a></h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># zypper refresh <span class="cmt" style="background-color: transparent; color: #000040;"># Refresh repositorie</span>
# zypper install vim <span class="cmt" style="background-color: transparent; color: #000040;"># Install the package vim</span>
# zypper remove vim <span class="cmt" style="background-color: transparent; color: #000040;"># Remove the package vim</span>
# zypper search vim <span class="cmt" style="background-color: transparent; color: #000040;"># Search packages with vim</span>
# zypper update vim <span class="cmt" style="background-color: transparent; color: #000040;"># Search packages with vim</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Debian</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># apt-get update <span class="cmt" style="background-color: transparent; color: #000040;"># First update the package lists</span>
# apt-get install emacs <span class="cmt" style="background-color: transparent; color: #000040;"># Install the package emacs</span>
# dpkg --remove emacs <span class="cmt" style="background-color: transparent; color: #000040;"># Remove the package emacs</span>
# dpkg -S file <span class="cmt" style="background-color: transparent; color: #000040;"># find what package a file belongs to</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Gentoo</h3>
Gentoo uses emerge as the heart of its "Portage" package management system.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># emerge --sync <span class="cmt" style="background-color: transparent; color: #000040;"># First sync the local portage tree</span>
# emerge -u packagename <span class="cmt" style="background-color: transparent; color: #000040;"># Install or upgrade a package</span>
# emerge -C packagename <span class="cmt" style="background-color: transparent; color: #000040;"># Remove the package</span>
# revdep-rebuild <span class="cmt" style="background-color: transparent; color: #000040;"># Repair dependencies</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Solaris</h3>
The <cdrom> path is usually <code style="color: #003300;">/cdrom/cdrom0</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># pkgadd -d <cdrom>/Solaris_9/Product SUNWgtar
# pkgadd -d SUNWgtar <span class="cmt" style="background-color: transparent; color: #000040;"># Add downloaded package (bunzip2 first)</span>
# pkgrm SUNWgtar <span class="cmt" style="background-color: transparent; color: #000040;"># Remove the package</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># pkg_add -r rsync <span class="cmt" style="background-color: transparent; color: #000040;"># Fetch and install rsync.</span>
# pkg_delete /var/db/pkg/rsync-xx <span class="cmt" style="background-color: transparent; color: #000040;"># Delete the rsync package</span>
</pre>
Set where the packages are fetched from with the <code style="color: #003300;">PACKAGESITE</code> variable. For example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># export PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages/Latest/
# or ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD <a href="http://www.freebsd.org/handbook/ports.html" style="background-color: transparent; color: #000040;">ports</a></h3>
The port tree <code style="color: #003300;">/usr/ports/</code> is a collection of software ready to compile and install (see man ports). The ports are updated with the program <code style="color: #003300;">portsnap</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># portsnap fetch extract <span class="cmt" style="background-color: transparent; color: #000040;"># Create the tree when running the first time</span>
# portsnap fetch update <span class="cmt" style="background-color: transparent; color: #000040;"># Update the port tree</span>
# cd /usr/ports/net/rsync/ <span class="cmt" style="background-color: transparent; color: #000040;"># Select the package to install</span>
# make install distclean <span class="cmt" style="background-color: transparent; color: #000040;"># Install and cleanup (also see man ports)</span>
# make package <span class="cmt" style="background-color: transparent; color: #000040;"># Make a binary package of this port</span>
# pkgdb -F <span class="cmt" style="background-color: transparent; color: #000040;"># Fix the package registry database</span>
# portsclean -C -DD <span class="cmt" style="background-color: transparent; color: #000040;"># Clean workdir and distdir (part of portupgrade)</span>
</pre>
<h3 id="macports" style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
OS X <a href="http://guide.macports.org/" style="background-color: transparent; color: #000040;">MacPorts</a> (use sudo for all commands)</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># port selfupdate <span class="cmt" style="background-color: transparent; color: #000040;"># Update the port tree (safe)</span>
# port installed <span class="cmt" style="background-color: transparent; color: #000040;"># List installed ports</span>
# port deps apache2 <span class="cmt" style="background-color: transparent; color: #000040;"># List dependencies for this port</span>
# port search pgrep <span class="cmt" style="background-color: transparent; color: #000040;"># Search for string</span>
# port install proctools <span class="cmt" style="background-color: transparent; color: #000040;"># Install this package</span>
# port variants ghostscript <span class="cmt" style="background-color: transparent; color: #000040;"># List variants of this port</span>
# port -v install ghostscript +no_x11<span class="cmt" style="background-color: transparent; color: #000040;"># -no_x11 for negative value</span>
# port clean --all ghostscript <span class="cmt" style="background-color: transparent; color: #000040;"># Clean workdir of port</span>
# port upgrade ghostscript <span class="cmt" style="background-color: transparent; color: #000040;"># Upgrade this port</span>
# port uninstall ghostscript <span class="cmt" style="background-color: transparent; color: #000040;"># Uninstall this port</span>
# port -f uninstall installed <span class="cmt" style="background-color: transparent; color: #000040;"># Uninstall everything</span>
</pre>
<h2 id="librarypath" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Library path</h2>
Due to complex dependencies and runtime linking, programs are difficult to copy to an other system or distribution. However for small programs with little dependencies, the missing libraries can be copied over. The runtime libraries (and the missing one) are checked with <code style="color: #003300;">ldd</code> and managed with <code style="color: #003300;">ldconfig</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ldd /usr/bin/rsync <span class="cmt" style="background-color: transparent; color: #000040;"># List all needed runtime libraries</span>
# otool -L /usr/bin/rsync <span class="cmt" style="background-color: transparent; color: #000040;"># OS X equivalent to ldd</span>
# ldconfig -n /path/to/libs/ <span class="cmt" style="background-color: transparent; color: #000040;"># Add a path to the shared libraries directories</span>
# ldconfig -m /path/to/libs/ <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD</span>
# LD_LIBRARY_PATH <span class="cmt" style="background-color: transparent; color: #000040;"># The variable set the link library path</span>
</pre>
</div>
<div id="convert" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">CONVERT MEDIA</a></h1>
Sometimes one simply need to convert a video, audio file or document to another format.<h2 id="encoding" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Text encoding</h2>
Text encoding can get totally wrong, specially when the language requires special characters like àäç. The command <code style="color: #003300;">iconv</code> can convert from one encoding to an other.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># iconv -f <from_encoding> -t <to_encoding> <input_file>
# iconv -f ISO8859-1 -t UTF-8 -o file.input > file_utf8
# iconv -l <span class="cmt" style="background-color: transparent; color: #000040;"># List known coded character sets</span>
</pre>
Without the -f option, iconv will use the local char-set, which is usually fine if the document displays well.<br />Convert filenames from one encoding to another (not file content). Works also if only some files are already utf8<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># convmv -r -f utf8 --nfd -t utf8 --nfc /dir/* --notest</pre>
<h2 id="newlines" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Unix - DOS newlines</h2>
Convert DOS (CR/LF) to Unix (LF) newlines and back <b>within a Unix shell</b>. See also <code style="color: #003300;">dos2unix</code> and <code style="color: #003300;">unix2dos</code> if you have them.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sed 's/.$//' dosfile.txt > unixfile.txt <span class="cmt" style="background-color: transparent; color: #000040;"># DOS to UNIX</span>
# awk '{sub(/\r$/,"");print}' dosfile.txt > unixfile.txt <span class="cmt" style="background-color: transparent; color: #000040;"># DOS to UNIX</span>
# awk '{sub(/$/,"\r");print}' unixfile.txt > dosfile.txt <span class="cmt" style="background-color: transparent; color: #000040;"># UNIX to DOS</span>
</pre>
Convert Unix to DOS newlines <b>within a Windows environment</b>. Use sed or awk from mingw or cygwin.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sed -n p unixfile.txt > dosfile.txt
# awk 1 unixfile.txt > dosfile.txt <span class="cmt" style="background-color: transparent; color: #000040;"># UNIX to DOS (with a cygwin shell)</span>
</pre>
Remove <code style="color: #003300;">^M</code> mac newline and replace with unix new line. To get a <code style="color: #003300;">^M</code> use CTL-V then CTL-M<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># tr '^M' '\n' < macfile.txt
</pre>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
PDF to Jpeg and concatenate PDF files</h2>
Convert a PDF document with <code style="color: #003300;">gs</code> (GhostScript) to jpeg (or png) images for each page. Also much shorter with <code style="color: #003300;">convert</code> and <code style="color: #003300;">mogrify</code> (from ImageMagick or GraphicsMagick).<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gs -dBATCH -dNOPAUSE -sDEVICE=jpeg -r150 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \
-dMaxStripSize=8192 -sOutputFile=unixtoolbox_%d.jpg unixtoolbox.pdf
# convert unixtoolbox.pdf unixtoolbox-%03d.png
# convert *.jpeg images.pdf <span class="cmt" style="background-color: transparent; color: #000040;"># Create a simple PDF with all pictures</span>
# convert image000* -resample 120x120 -compress JPEG -quality 80 images.pdf
# mogrify -format png *.ppm <span class="cmt" style="background-color: transparent; color: #000040;"># convert all ppm images to png format</span>
</pre>
Ghostscript can also concatenate multiple pdf files into a single one. This only works well if the PDF files are "well behaved".<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=all.pdf \
file1.pdf file2.pdf ... <span class="cmt" style="background-color: transparent; color: #000040;"># On Windows use '#' instead of '='</span>
</pre>
Extract images from pdf document using <code style="color: #003300;">pdfimages</code> from poppler or <a href="http://foolabs.com/xpdf/download.html" style="background-color: transparent; color: #000040;"><code style="color: #003300;">xpdf</code></a><pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># pdfimages document.pdf dst/ <span class="cmt" style="background-color: transparent; color: #000040;"># extract all images and put in dst</span>
# yum install poppler-utils <span class="cmt" style="background-color: transparent; color: #000040;"># install poppler-utils if needed. or:</span>
# apt-get install poppler-utils
</pre>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Convert video</h2>
Compress the Canon digicam video with an mpeg4 codec and repair the crappy sound.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mencoder -o videoout.avi -oac mp3lame -ovc lavc -srate 11025 \
-channels 1 -af-adv force=1 -lameopts preset=medium -lavcopts \
vcodec=msmpeg4v2:vbitrate=600 -mc 0 vidoein.AVI
</pre>
See <a href="http://sox.sourceforge.net/" style="background-color: transparent; color: #000040;">sox</a> for sound processing.<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Copy an audio cd</h2>
The program <a href="http://xiph.org/paranoia/" rel="nofollow" style="background-color: transparent; color: #000040;"><code style="color: #003300;">cdparanoia</code></a> can save the audio tracks (FreeBSD port in audio/cdparanoia/), <code style="color: #003300;">oggenc</code> can encode in Ogg Vorbis format, <code style="color: #003300;">lame</code> converts to mp3.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cdparanoia -B <span class="cmt" style="background-color: transparent; color: #000040;"># Copy the tracks to wav files in current dir</span>
# lame -b 256 in.wav out.mp3 <span class="cmt" style="background-color: transparent; color: #000040;"># Encode in mp3 256 kb/s</span>
# for i in *.wav; do lame -b 256 $i `basename $i .wav`.mp3; done
# oggenc in.wav -b 256 out.ogg <span class="cmt" style="background-color: transparent; color: #000040;"># Encode in Ogg Vorbis 256 kb/s</span>
</pre>
</div>
<div id="printing" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">PRINTING</a></h1>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Print with lpr</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"># lpr unixtoolbox.ps <span class="cmt" style="background-color: transparent; color: #000040;"># Print on default printer</span>
# export PRINTER=hp4600 <span class="cmt" style="background-color: transparent; color: #000040;"># Change the default printer</span>
# lpr -Php4500 #2 unixtoolbox.ps <span class="cmt" style="background-color: transparent; color: #000040;"># Use printer hp4500 and print 2 copies</span>
# lpr -o Duplex=DuplexNoTumble ... <span class="cmt" style="background-color: transparent; color: #000040;"># Print duplex along the long side</span>
# lpr -o PageSize=A4,Duplex=DuplexNoTumble ...
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># lpq <span class="cmt" style="background-color: transparent; color: #000040;"># Check the queue on default printer</span>
# lpq -l -Php4500 <span class="cmt" style="background-color: transparent; color: #000040;"># Queue on printer hp4500 with verbose</span>
# lprm - <span class="cmt" style="background-color: transparent; color: #000040;"># Remove all users jobs on default printer</span>
# lprm -Php4500 3186 <span class="cmt" style="background-color: transparent; color: #000040;"># Remove job 3186. Find job nbr with lpq</span>
# lpc status <span class="cmt" style="background-color: transparent; color: #000040;"># List all available printers</span>
# lpc status hp4500 <span class="cmt" style="background-color: transparent; color: #000040;"># Check if printer is online and queue length</span>
</pre>
Some devices are not postscript and will print garbage when fed with a pdf file. This might be solved with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr file.pdf</pre>
Print to a PDF file even if the application does not support it. Use <code style="color: #003300;">gs</code> on the print command instead of <code style="color: #003300;">lpr</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/path/file.pdf</pre>
</div>
<div id="databases" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">DATABASES</a></h1>
<h2 id="pgsql" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
PostgreSQL</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Change root or a username password</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># psql -d template1 -U pgsql
> alter user pgsql with password 'pgsql_password'; <span class="cmt" style="background-color: transparent; color: #000040;"># Use username instead of "pgsql"</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Create user and database</h3>
The commands <code style="color: #003300;">createuser</code>, <code style="color: #003300;">dropuser</code>, <code style="color: #003300;">createdb</code> and <code style="color: #003300;">dropdb</code> are convenient shortcuts equivalent to the SQL commands. The new user is bob with database bobdb ; use as root with pgsql the database super user:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># createuser -U pgsql -P bob <span class="cmt" style="background-color: transparent; color: #000040;"># -P will ask for password</span>
# createdb -U pgsql -O bob bobdb <span class="cmt" style="background-color: transparent; color: #000040;"># new bobdb is owned by bob</span>
# dropdb bobdb <span class="cmt" style="background-color: transparent; color: #000040;"># Delete database bobdb</span>
# dropuser bob <span class="cmt" style="background-color: transparent; color: #000040;"># Delete user bob</span>
</pre>
The general database authentication mechanism is configured in pg_hba.conf<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Grant remote access</h3>
The file <code style="color: #003300;">$PGSQL_DATA_D/postgresql.conf</code> specifies the address to bind to. Typically <code style="color: #003300;">listen_addresses = '*'</code> for Postgres 8.x.<br />The file <code style="color: #003300;">$PGSQL_DATA_D/pg_hba.conf</code> defines the access control. Examples:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host bobdb bob 212.117.81.42 255.255.255.255 password
host all all 0.0.0.0/0 password
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Backup and restore</h3>
The backups and restore are done with the user pgsql or postgres. Backup and restore a single database:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># pg_dump --clean dbname > dbname_sql.dump
# psql dbname < dbname_sql.dump
</pre>
Backup and restore all databases (including users):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># pg_dumpall --clean > full.dump
# psql -f full.dump postgres
</pre>
In this case the restore is started with the database postgres which is better when reloading an empty cluster.<h2 id="mysql" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
MySQL</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Change mysql root or username password</h3>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Method 1</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># /etc/init.d/mysql stop
<i><span class="cmt" style="background-color: transparent; color: #000040;">or</span></i>
# killall mysqld
# mysqld --skip-grant-tables
# mysqladmin -u root password 'newpasswd'
# /etc/init.d/mysql start
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Method 2</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mysql -u root mysql
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> UPDATE USER SET PASSWORD=PASSWORD("newpassword") where user='root';
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> FLUSH PRIVILEGES; <span class="cmt" style="background-color: transparent; color: #000040;"># Use username instead of "root"</span>
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> quit
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Create user and database (see <a href="http://dev.mysql.com/doc/refman/5.1/en/adding-users.html" style="background-color: transparent; color: #000040;">MySQL doc</a>)</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mysql -u root mysql
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> CREATE USER 'bob'@'localhost' IDENTIFIED BY 'pwd'; <span class="cmt" style="background-color: transparent; color: #000040;"># create only a user</span>
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> CREATE DATABASE bobdb;
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> GRANT ALL ON *.* TO 'bob'@'%' IDENTIFIED BY 'pwd'; <span class="cmt" style="background-color: transparent; color: #000040;"># Use localhost instead of %</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># to restrict the network access</span>
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> DROP DATABASE bobdb; <span class="cmt" style="background-color: transparent; color: #000040;"># Delete database</span>
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> DROP USER bob; <span class="cmt" style="background-color: transparent; color: #000040;"># Delete user</span>
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> DELETE FROM mysql.user WHERE user='bob and host='hostname'; <span class="cmt" style="background-color: transparent; color: #000040;"># Alt. command</span>
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> FLUSH PRIVILEGES;
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Grant remote access</h3>
Remote access is typically permitted for a database, and not all databases. The file <code style="color: #003300;">/etc/my.cnf</code> contains the IP address to bind to. (On FreeBSD <code style="color: #003300;">my.cnf</code> not created per fedault, copy one <code style="color: #003300;">.cnf</code> file from <code style="color: #003300;">/usr/local/share/mysql</code> to <code style="color: #003300;">/usr/local/etc/my.cnf</code>) Typically comment the line <code style="color: #003300;">bind-address =</code> out.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mysql -u root mysql
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> GRANT ALL ON bobdb.* TO bob@'xxx.xxx.xxx.xxx' IDENTIFIED BY 'PASSWORD';
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> REVOKE GRANT OPTION ON foo.* FROM bar@'xxx.xxx.xxx.xxx';
<span class="cmt" style="background-color: transparent; color: #000040;">mysql></span> FLUSH PRIVILEGES; <span class="cmt" style="background-color: transparent; color: #000040;"># Use 'hostname' or also '%' for full access</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Backup and restore</h3>
Backup and restore a single database:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mysqldump -u root -psecret --add-drop-database dbname > dbname_sql.dump
# mysql -u root -psecret -D dbname < dbname_sql.dump
</pre>
Backup and restore all databases:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># mysqldump -u root -psecret --add-drop-database --all-databases > full.dump
# mysql -u root -psecret < full.dump
</pre>
Here is "secret" the mysql root password, there is no space after -p. When the -p option is used alone (w/o password), the password is asked at the command prompt.<h2 id="sqlite" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
SQLite</h2>
<a href="http://www.sqlite.org/" style="background-color: transparent; color: #000040;">SQLite</a> is a small powerful self-contained, serverless, zero-configuration SQL database.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Dump and restore</h3>
It can be useful to dump and restore an SQLite database. For example you can edit the dump file to change a column attribute or type and then restore the database. This is easier than messing with SQL commands. Use the command <code style="color: #003300;">sqlite3</code> for a 3.x database.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># sqlite database.db .dump > dump.sql <span class="cmt" style="background-color: transparent; color: #000040;"># dump</span>
# sqlite database.db < dump.sql <span class="cmt" style="background-color: transparent; color: #000040;"># restore</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Convert 2.x to 3.x database</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">sqlite database_v2.db .dump | sqlite3 database_v3.db</pre>
</div>
<div id="quota" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">DISK QUOTA</a></h1>
A disk quota allows to limit the amount of disk space and/or the number of files a user or (or member of group) can use. The quotas are allocated on a per-file system basis and are enforced by the kernel.<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Linux setup</h2>
The quota tools package usually needs to be installed, it contains the command line tools.<br />Activate the user quota in the fstab and remount the partition. If the partition is busy, either all locked files must be closed, or the system must be rebooted. Add <code style="color: #003300;">usrquota</code> to the fstab mount options, for example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">/dev/sda2 /home reiserfs rw,acl,user_xattr,usrquota 1 1
# mount -o remount /home
# mount <span class="cmt" style="background-color: transparent; color: #000040;"># Check if usrquota is active, otherwise reboot</span>
</pre>
Initialize the quota.user file with <code style="color: #003300;">quotacheck</code>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># quotacheck -vum /home
# chmod 644 /home/aquota.user <span class="cmt" style="background-color: transparent; color: #000040;"># To let the users check their own quota</span>
</pre>
Activate the quota either with the provided script (e.g. /etc/init.d/quotad on SuSE) or with <code style="color: #003300;">quotaon</code>:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">quotaon -vu /home</pre>
Check that the quota is active with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">quota -v</pre>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
FreeBSD setup</h2>
The quota tools are part of the base system, however the kernel needs the option quota. If it is not there, add it and <a href="http://cb.vu/unixtoolbox.xhtml#compilekernel" style="background-color: transparent; color: #000040;">recompile</a> the kernel.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">options QUOTA</pre>
As with Linux, add the quota to the fstab options (userquota, not usrquota):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">/dev/ad0s1d /home ufs rw,noatime,userquota 2 2
# mount /home <span class="cmt" style="background-color: transparent; color: #000040;"># To remount the partition</span>
</pre>
Enable disk quotas in /etc/rc.conf and start the quota.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># grep quotas /etc/rc.conf
enable_quotas="YES" <span class="cmt" style="background-color: transparent; color: #000040;"># turn on quotas on startup (or NO).</span>
check_quotas="YES" <span class="cmt" style="background-color: transparent; color: #000040;"># Check quotas on startup (or NO).</span>
# /etc/rc.d/quota start
</pre>
<h2 id="assignquota" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Assign quota limits</h2>
The quotas are not limited per default (set to 0). The limits are set with <code style="color: #003300;">edquota</code> for single users. A quota can be also duplicated to many users. The file structure is different between the quota implementations, but the principle is the same: the values of blocks and inodes can be limited. <i>Only change the values of soft and hard</i>. If not specified, the blocks are 1k. The grace period is set with <code style="color: #003300;">edquota -t</code>. For example:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># edquota -u colin</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Linux</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">Disk quotas for user colin (uid 1007):
Filesystem blocks soft hard inodes soft hard
/dev/sda8 108 1000 2000 1 0 0
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
FreeBSD</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">Quotas for user colin:
/home: kbytes in use: 504184, limits (soft = 700000, hard = 800000)
inodes in use: 1792, limits (soft = 0, hard = 0)
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
For many users</h3>
The command <code style="color: #003300;">edquota -p</code> is used to duplicate a quota to other users. For example to duplicate a reference quota to all users:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># edquota -p refuser `awk -F: '$3 > 499 {print $1}' /etc/passwd`
# edquota -p refuser user1 user2 <span class="cmt" style="background-color: transparent; color: #000040;"># Duplicate to 2 users</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Checks</h3>
Users can check their quota by simply typing <code style="color: #003300;">quota</code> (the file quota.user must be readable). Root can check all quotas.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># quota -u colin <span class="cmt" style="background-color: transparent; color: #000040;"># Check quota for a user</span>
# repquota /home <span class="cmt" style="background-color: transparent; color: #000040;"># Full report for the partition for all users</span>
</pre>
</div>
<div id="shells" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">SHELLS</a></h1>
Most Linux distributions use the bash shell while the BSDs use tcsh, the bourne shell is only used for scripts. Filters are very useful and can be piped:<ul style="list-style-type: none;">
<li><code style="color: #003300;">grep</code> Pattern matching</li>
<li><code style="color: #003300;">sed</code> Search and Replace strings or characters</li>
<li><code style="color: #003300;">cut</code> Print specific columns from a marker</li>
<li><code style="color: #003300;">sort</code> Sort alphabetically or numerically</li>
<li><code style="color: #003300;">uniq</code> Remove duplicate lines from a file</li>
</ul>
For example used all at once:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ifconfig | sed 's/ / /g' | cut -d" " -f1 | uniq | grep -E "[a-z0-9]+" | sort -r
# ifconfig | sed '/.*inet addr:/!d;s///;s/ .*//'|sort -t. -k1,1n -k2,2n -k3,3n -k4,4n
</pre>
The first character in the sed pattern is a tab. To write a tab on the console, use ctrl-v ctrl-tab.<h2 id="bash" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
bash</h2>
Redirects and pipes for bash and sh:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cmd 1> file <span class="cmt" style="background-color: transparent; color: #000040;"># Redirect stdout to file.</span>
# cmd 2> file <span class="cmt" style="background-color: transparent; color: #000040;"># Redirect stderr to file.</span>
# cmd 1>> file <span class="cmt" style="background-color: transparent; color: #000040;"># Redirect and append stdout to file.</span>
# cmd &> file <span class="cmt" style="background-color: transparent; color: #000040;"># Redirect both stdout and stderr to file.</span>
# cmd >file 2>&1 <span class="cmt" style="background-color: transparent; color: #000040;"># Redirects stderr to stdout and then to file.</span>
# cmd1 | cmd2 <span class="cmt" style="background-color: transparent; color: #000040;"># pipe stdout to cmd2</span>
# cmd1 2>&1 | cmd2 <span class="cmt" style="background-color: transparent; color: #000040;"># pipe stdout and stderr to cmd2</span>
</pre>
Modify your configuration in ~/.bashrc (it can also be ~/.bash_profile). The following entries are useful, reload with ". .bashrc". With cygwin use ~/.bash_profile; with rxvt past with shift + left-click.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"># in .bashrc
bind '"\e[A"':history-search-backward <span class="cmt" style="background-color: transparent; color: #000040;"># Use up and down arrow to search</span>
bind '"\e[B"':history-search-forward <span class="cmt" style="background-color: transparent; color: #000040;"># the history. Invaluable!</span>
set -o emacs <span class="cmt" style="background-color: transparent; color: #000040;"># Set emacs mode in bash (see below)</span>
set bell-style visible <span class="cmt" style="background-color: transparent; color: #000040;"># Do not beep, inverse colors</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># Set a nice prompt like [user@host]/path/todir></span>
PS1="\[\033[1;30m\][\[\033[1;34m\]\u\[\033[1;30m\]"
PS1="$PS1@\[\033[0;33m\]\h\[\033[1;30m\]]\[\033[0;37m\]"
PS1="$PS1\w\[\033[1;30m\]>\[\033[0m\]"
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;"># To check the currently active aliases, simply type alias</span>
alias ls='ls -aF' <span class="cmt" style="background-color: transparent; color: #000040;"># Append indicator (one of */=>@|)</span>
alias ll='ls -aFls' <span class="cmt" style="background-color: transparent; color: #000040;"># Listing</span>
alias la='ls -all'
alias ..='cd ..'
alias ...='cd ../..'
export HISTFILESIZE=5000 <span class="cmt" style="background-color: transparent; color: #000040;"># Larger history</span>
export CLICOLOR=1 <span class="cmt" style="background-color: transparent; color: #000040;"># Use colors (if possible)</span>
export LSCOLORS=ExGxFxdxCxDxDxBxBxExEx
</pre>
<h2 id="tcsh" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
tcsh</h2>
Redirects and pipes for tcsh and csh (simple > and >> are the same as sh):<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># cmd >& file <span class="cmt" style="background-color: transparent; color: #000040;"># Redirect both stdout and stderr to file.</span>
# cmd >>& file <span class="cmt" style="background-color: transparent; color: #000040;"># Append both stdout and stderr to file.</span>
# cmd1 | cmd2 <span class="cmt" style="background-color: transparent; color: #000040;"># pipe stdout to cmd2</span>
# cmd1 |& cmd2 <span class="cmt" style="background-color: transparent; color: #000040;"># pipe stdout and stderr to cmd2</span>
</pre>
The settings for csh/tcsh are set in <code style="color: #003300;">~/.cshrc</code>, reload with "source .cshrc". Examples:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"># in .cshrc
alias ls 'ls -aF'
alias ll 'ls -aFls'
alias la 'ls -all'
alias .. 'cd ..'
alias ... 'cd ../..'
set prompt = "%B%n%b@%B%m%b%/> " <span class="cmt" style="background-color: transparent; color: #000040;"># like user@host/path/todir></span>
set history = 5000
set savehist = ( 6000 merge )
set autolist <span class="cmt" style="background-color: transparent; color: #000040;"># Report possible completions with tab</span>
set visiblebell <span class="cmt" style="background-color: transparent; color: #000040;"># Do not beep, inverse colors</span>
</pre>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="cmt" style="background-color: transparent; color: #000040;"># Bindkey and colors</span>
bindkey -e Select Emacs bindings <span class="cmt" style="background-color: transparent; color: #000040;"># Use emacs keys to edit the command prompt</span>
bindkey -k up history-search-backward <span class="cmt" style="background-color: transparent; color: #000040;"># Use up and down arrow to search</span>
bindkey -k down history-search-forward
setenv CLICOLOR 1 <span class="cmt" style="background-color: transparent; color: #000040;"># Use colors (if possible)</span>
setenv LSCOLORS ExGxFxdxCxDxDxBxBxExEx
</pre>
The emacs mode enables to use the emacs keys shortcuts to modify the command prompt line. This is extremely useful (not only for emacs users). The most used commands are:<ul style="list-style-type: none;">
<li>C-a Move cursor to beginning of line</li>
<li>C-e Move cursor to end of line</li>
<li>M-b Move cursor back one word</li>
<li>M-f Move cursor forward one word</li>
<li>M-d Cut the next word</li>
<li>C-w Cut the last word</li>
<li>C-u Cut everything before the cursor</li>
<li>C-k Cut everything after the cursor (rest of the line)</li>
<li>C-y Paste the last thing to be cut (simply paste)</li>
<li>C-_ Undo</li>
</ul>
<i>Note:</i> C- = hold control, M- = hold meta (which is usually the alt or escape key).</div>
<div id="scripting" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">SCRIPTING</a></h1>
<div class="xrefp">
<a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#bournebasics" style="background-color: transparent; color: #000040;">Basics</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#bourneexample" style="background-color: transparent; color: #000040;">Script example</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#awk" style="background-color: transparent; color: #000040;">awk</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#sed" style="background-color: transparent; color: #000040;">sed</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#regex" style="background-color: transparent; color: #000040;">Regular Expressions</a> | <a class="xrefp" href="http://cb.vu/unixtoolbox.xhtml#shcmd" style="background-color: transparent; color: #000040;">useful commands</a></div>
The Bourne shell (/bin/sh) is present on all Unix installations and scripts written in this language are (quite) portable; <code style="color: #003300;">man 1 sh</code> is a good reference.<h2 id="bournebasics" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Basics</h2>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Variables and arguments</h3>
Assign with variable=value and get content with $variable<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">MESSAGE="Hello World" <span class="cmt" style="background-color: transparent; color: #000040;"># Assign a string</span>
PI=3.1415 <span class="cmt" style="background-color: transparent; color: #000040;"># Assign a decimal number</span>
N=8
TWON=`expr $N * 2` <span class="cmt" style="background-color: transparent; color: #000040;"># Arithmetic expression (only integers)</span>
TWON=$(($N * 2)) <span class="cmt" style="background-color: transparent; color: #000040;"># Other syntax</span>
TWOPI=`echo "$PI * 2" | bc -l` <span class="cmt" style="background-color: transparent; color: #000040;"># Use bc for floating point operations</span>
ZERO=`echo "c($PI/4)-sqrt(2)/2" | bc -l`
</pre>
The command line arguments are<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">$0, $1, $2, ... <span class="cmt" style="background-color: transparent; color: #000040;"># $0 is the command itself</span>
$# <span class="cmt" style="background-color: transparent; color: #000040;"># The number of arguments</span>
$* <span class="cmt" style="background-color: transparent; color: #000040;"># All arguments (also $@)</span>
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Special Variables</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">$$ <span class="cmt" style="background-color: transparent; color: #000040;"># The current process ID</span>
$? <span class="cmt" style="background-color: transparent; color: #000040;"># exit status of last command</span>
command
<span class="keyword" style="color: blue;">if</span> [ $<span class="pp" style="color: #d55500;">?</span> != 0 ]; <span class="keyword" style="color: blue;">then</span>
echo "command failed"
<span class="keyword" style="color: blue;">fi</span>
<span class="pp" style="color: #d55500;">mypath</span>=`pwd`
<span class="pp" style="color: #d55500;">mypath</span>=${<span class="pp" style="color: #d55500;">mypath</span>}/file.txt
echo ${<span class="pp" style="color: #d55500;">mypath</span>##*/} <span class="cmt" style="background-color: transparent; color: #000040;"># Display the filename only</span>
echo ${<span class="pp" style="color: #d55500;">mypath</span>%%.*} <span class="cmt" style="background-color: transparent; color: #000040;"># Full path without extention</span>
foo=/tmp/my.dir/filename.tar.gz
path = ${foo%/*} <span class="cmt" style="background-color: transparent; color: #000040;"># Full path without extention</span>
<span class="pp" style="color: #d55500;">var2</span>=${<span class="pp" style="color: #d55500;">var</span>:=string} <span class="cmt" style="background-color: transparent; color: #000040;"># Use var if set, otherwise use string
# assign string to var and then to var2.</span>
size=$(stat -c%s "$file") <span class="cmt" style="background-color: transparent; color: #000040;"># get file size in bourne script</span>
filesize=${size:=-1}
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
Constructs</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="keyword" style="color: blue;">for</span> <span class="pp" style="color: #d55500;">file</span> in `ls`
<span class="keyword" style="color: blue;">do</span>
echo $<span class="pp" style="color: #d55500;">file</span>
<span class="keyword" style="color: blue;">done</span>
<span class="pp" style="color: #d55500;">count</span>=0
<span class="keyword" style="color: blue;">while</span> [ $<span class="pp" style="color: #d55500;">count</span> -lt 5 ]; <span class="keyword" style="color: blue;">do</span>
echo $<span class="pp" style="color: #d55500;">count</span>
sleep 1
<span class="pp" style="color: #d55500;">count</span>=$(($<span class="pp" style="color: #d55500;">count</span> + 1))
<span class="keyword" style="color: blue;">done</span>
myfunction() {
find . -type f -name "*.$<span class="pp" style="color: #d55500;">1</span>" -print <span class="cmt" style="background-color: transparent; color: #000040;"># $1 is first argument of the function</span>
}
myfunction "txt"
</pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
Generate a file</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="pp" style="color: #d55500;">MYHOME</span>=/home/colin
cat > testhome.sh << _EOF
<span class="cmt" style="background-color: transparent; color: #000040;"># All of this goes into the file testhome.sh</span>
<span class="keyword" style="color: blue;">if</span> [ -d "$<span class="pp" style="color: #d55500;">MYHOME</span>" ] ; <span class="keyword" style="color: blue;">then</span>
echo $<span class="pp" style="color: #d55500;">MYHOME</span> exists
<span class="keyword" style="color: blue;">else</span>
echo $<span class="pp" style="color: #d55500;">MYHOME</span> does not exist
<span class="keyword" style="color: blue;">fi</span>
_EOF
sh testhome.sh
</pre>
<h2 id="bourneexample" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Bourne script example</h2>
As a small example, the script used to create a PDF booklet from this xhtml document:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"><span class="pp" style="color: #d55500;">#!/bin/sh</span>
<span class="cmt" style="background-color: transparent; color: #000040;"># This script creates a book in pdf format ready to print on a duplex printer</span>
<span class="keyword" style="color: blue;">if</span> [ $<span class="pp" style="color: #d55500;">#</span> <span class="keyword" style="color: blue;">-ne</span> 1 ]; <span class="keyword" style="color: blue;">then</span> <span class="cmt" style="background-color: transparent; color: #000040;"># Check the argument</span>
echo 1>&2 "Usage: $0 HtmlFile"
<span class="keyword" style="color: blue;">exit</span> 1 <span class="cmt" style="background-color: transparent; color: #000040;"># non zero exit if error</span>
<span class="keyword" style="color: blue;">fi</span>
<span class="pp" style="color: #d55500;">file</span>=$<span class="pp" style="color: #d55500;">1</span> <span class="cmt" style="background-color: transparent; color: #000040;"># Assign the filename</span>
<span class="pp" style="color: #d55500;">fname</span>=${<span class="pp" style="color: #d55500;">file</span>%.*} <span class="cmt" style="background-color: transparent; color: #000040;"># Get the name of the file only</span>
<span class="pp" style="color: #d55500;">fext</span>=${<span class="pp" style="color: #d55500;">file</span>#*.} <span class="cmt" style="background-color: transparent; color: #000040;"># Get the extension of the file</span>
prince $<span class="pp" style="color: #d55500;">file</span> -o $<span class="pp" style="color: #d55500;">fname</span>.pdf <span class="cmt" style="background-color: transparent; color: #000040;"># from www.princexml.com</span>
pdftops -paper A4 -noshrink $<span class="pp" style="color: #d55500;">fname</span>.pdf $<span class="pp" style="color: #d55500;">fname</span>.ps <span class="cmt" style="background-color: transparent; color: #000040;"># create postscript booklet</span>
cat $<span class="pp" style="color: #d55500;">fname</span>.ps |psbook|psnup -Pa4 -2 |pstops -b "2:0,1U(21cm,29.7cm)" > $<span class="pp" style="color: #d55500;">fname</span>.book.ps
ps2pdf13 -sPAPERSIZE=a4 -sAutoRotatePages=None $<span class="pp" style="color: #d55500;">fname</span>.book.ps $<span class="pp" style="color: #d55500;">fname</span>.book.pdf
<span class="cmt" style="background-color: transparent; color: #000040;"># use #a4 and #None on Windows!</span>
<span class="keyword" style="color: blue;">exit</span> 0 <span class="cmt" style="background-color: transparent; color: #000040;"># exit 0 means successful</span>
</pre>
<h2 id="awk" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Some awk commands</h2>
Awk is useful for field stripping, like cut in a more powerful way. Search this document for other examples. See for example <a href="http://www.gnulamp.com/awk.html" style="background-color: transparent; color: #000040;">gnulamp.com</a> and <a href="http://student.northpark.edu/pemente/awk/awk1line.txt" style="background-color: transparent; color: #000040;">one-liners for awk</a>for some nice examples.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">awk '{ print $2, $1 }' file <span class="cmt" style="background-color: transparent; color: #000040;"># Print and inverse first two columns</span>
awk '{printf("%5d : %s\n", NR,$0)}' file <span class="cmt" style="background-color: transparent; color: #000040;"># Add line number left aligned</span>
awk '{print FNR "\t" $0}' files <span class="cmt" style="background-color: transparent; color: #000040;"># Add line number right aligned</span>
awk NF test.txt <span class="cmt" style="background-color: transparent; color: #000040;"># remove blank lines (same as grep '.')</span>
awk 'length > 80' <span class="cmt" style="background-color: transparent; color: #000040;"># print line longer than 80 char)</span>
</pre>
<h2 id="sed" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Some sed commands</h2>
Here is <a href="http://student.northpark.edu/pemente/sed/sed1line.txt" style="background-color: transparent; color: #000040;">the one liner gold mine</a>. And a good <a href="http://www.grymoire.com/Unix/Sed.html" style="background-color: transparent; color: #000040;">introduction and tutorial to sed</a>.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">sed 's/string1/string2/g' <span class="cmt" style="background-color: transparent; color: #000040;"># Replace string1 with string2</span>
sed -i 's/wroong/wrong/g' *.txt <span class="cmt" style="background-color: transparent; color: #000040;"># Replace a recurring word with g</span>
sed 's/\(.*\)1/\12/g' <span class="cmt" style="background-color: transparent; color: #000040;"># Modify anystring1 to anystring2</span>
sed '/<p>/,/<\/p>/d' t.xhtml <span class="cmt" style="background-color: transparent; color: #000040;"># Delete lines that start with <p></span>
<span class="cmt" style="background-color: transparent; color: #000040;"># and end with </p></span>
sed '/ *#/d; /^ *$/d' <span class="cmt" style="background-color: transparent; color: #000040;"># Remove comments and blank lines</span>
sed 's/[ \t]*$//' <span class="cmt" style="background-color: transparent; color: #000040;"># Remove trailing spaces (use tab as \t)</span>
sed 's/^[ \t]*//;s/[ \t]*$//' <span class="cmt" style="background-color: transparent; color: #000040;"># Remove leading and trailing spaces</span>
sed 's/[^*]/[&]/' <span class="cmt" style="background-color: transparent; color: #000040;"># Enclose first char with [] top->[t]op</span>
sed = file | sed 'N;s/\n/\t/' > file.num <span class="cmt" style="background-color: transparent; color: #000040;"># Number lines on a file</span>
</pre>
<h2 id="regex" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Regular Expressions</h2>
Some basic regular expression useful for sed too. See <a href="http://www.regular-expressions.info/reference.html" style="background-color: transparent; color: #000040;">Basic Regex Syntax</a> for a good primer.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">[\^$.|?*+() <span class="cmt" style="background-color: transparent; color: #000040;"># special characters any other will match themselves</span>
\ <span class="cmt" style="background-color: transparent; color: #000040;"># escapes special characters and treat as literal</span>
* <span class="cmt" style="background-color: transparent; color: #000040;"># repeat the previous item zero or more times</span>
. <span class="cmt" style="background-color: transparent; color: #000040;"># single character except line break characters</span>
.* <span class="cmt" style="background-color: transparent; color: #000040;"># match zero or more characters</span>
^ <span class="cmt" style="background-color: transparent; color: #000040;"># match at the start of a line/string</span>
$ <span class="cmt" style="background-color: transparent; color: #000040;"># match at the end of a line/string</span>
.$ <span class="cmt" style="background-color: transparent; color: #000040;"># match a single character at the end of line/string</span>
^ $ <span class="cmt" style="background-color: transparent; color: #000040;"># match line with a single space</span>
[^A-Z] <span class="cmt" style="background-color: transparent; color: #000040;"># match any line beginning with any char from A to Z</span>
</pre>
<h2 id="shcmd" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Some useful commands</h2>
The following commands are useful to include in a script or as one liners.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">sort -t. -k1,1n -k2,2n -k3,3n -k4,4n <span class="cmt" style="background-color: transparent; color: #000040;"># Sort IPv4 ip addresses</span>
echo 'Test' | tr '[:lower:]' '[:upper:]' <span class="cmt" style="background-color: transparent; color: #000040;"># Case conversion</span>
echo foo.bar | cut -d . -f 1 <span class="cmt" style="background-color: transparent; color: #000040;"># Returns foo</span>
PID=$(ps | grep script.sh | grep bin | awk '{print $1}') <span class="cmt" style="background-color: transparent; color: #000040;"># PID of a running script</span>
PID=$(ps axww | grep [p]ing | awk '{print $1}') <span class="cmt" style="background-color: transparent; color: #000040;"># PID of ping (w/o grep pid)</span>
IP=$(ifconfig $INTERFACE | sed '/.*inet addr:/!d;s///;s/ .*//') <span class="cmt" style="background-color: transparent; color: #000040;"># Linux</span>
IP=$(ifconfig $INTERFACE | sed '/.*inet /!d;s///;s/ .*//') <span class="cmt" style="background-color: transparent; color: #000040;"># FreeBSD</span>
if [ `diff file1 file2 | wc -l` != 0 ]; then [...] fi <span class="cmt" style="background-color: transparent; color: #000040;"># File changed?</span>
cat /etc/master.passwd | grep -v root | grep -v \*: | awk -F":" \ <span class="cmt" style="background-color: transparent; color: #000040;"># Create http passwd</span>
'{ printf("%s:%s\n", $1, $2) }' > /usr/local/etc/apache2/passwd
testuser=$(cat /usr/local/etc/apache2/passwd | grep -v \ <span class="cmt" style="background-color: transparent; color: #000040;"># Check user in passwd</span>
root | grep -v \*: | awk -F":" '{ printf("%s\n", $1) }' | grep ^user$)
:(){ :|:& };: <span class="cmt" style="background-color: transparent; color: #000040;"># bash fork bomb. Will kill your machine</span>
tail +2 file > file2 <span class="cmt" style="background-color: transparent; color: #000040;"># remove the first line from file</span>
</pre>
I use this little trick to change the file extension for many files at once. For example from .cxx to .cpp. Test it first without the <code style="color: #003300;">| sh</code> at the end. You can also do this with the command <code style="color: #003300;">rename</code> if installed. Or with bash builtins.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ls *.cxx | awk -F. '{print "mv "$0" "$1".cpp"}' | sh
# ls *.c | sed "s/.*/cp & &.$(date "+%Y%m%d")/" | sh <span class="cmt" style="background-color: transparent; color: #000040;"># e.g. copy *.c to *.c.20080401</span>
# rename .cxx .cpp *.cxx <span class="cmt" style="background-color: transparent; color: #000040;"># Rename all .cxx to cpp</span>
# for i in *.cxx; do mv $i ${i%%.cxx}.cpp; done <span class="cmt" style="background-color: transparent; color: #000040;"># with bash builtins</span>
</pre>
</div>
<div id="programming" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">PROGRAMMING</a></h1>
<h2 id="cbasics" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
C basics</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">strcpy(newstr,str) <span class="cmt" style="background-color: transparent; color: #000040;">/* copy str to newstr */</span>
expr1 ? expr2 : expr3 <span class="cmt" style="background-color: transparent; color: #000040;">/* if (expr1) expr2 else expr3 */</span>
x = (y > z) ? y : z; <span class="cmt" style="background-color: transparent; color: #000040;">/* if (y > z) x = y; else x = z; */</span>
int a[]={0,1,2}; <span class="cmt" style="background-color: transparent; color: #000040;">/* Initialized array (or a[3]={0,1,2}; */</span>
int a[2][3]={{1,2,3},{4,5,6}}; <span class="cmt" style="background-color: transparent; color: #000040;">/* Array of array of ints */</span>
int i = 12345; <span class="cmt" style="background-color: transparent; color: #000040;">/* Convert in i to char str */</span>
char str[10];
sprintf(str, "%d", i);
</pre>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
C example</h2>
A minimal c program simple.c:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"><span class="pp" style="color: #d55500;">#include</span> <stdio.h>
main() {
<span class="keyword" style="color: blue;">int</span> number=42;
printf("The answer is %i\n", number);
}
</pre>
Compile with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># gcc simple.c -o simple
# ./simple
The answer is 42
</pre>
<h2 id="cppbasics" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
C++ basics</h2>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;">*pointer <span class="cmt" style="background-color: transparent; color: #000040;">// Object pointed to by pointer</span>
&obj <span class="cmt" style="background-color: transparent; color: #000040;">// Address of object obj</span>
obj.x <span class="cmt" style="background-color: transparent; color: #000040;">// Member x of class obj (object obj)</span>
pobj->x <span class="cmt" style="background-color: transparent; color: #000040;">// Member x of class pointed to by pobj</span>
<span class="cmt" style="background-color: transparent; color: #000040;">// (*pobj).x and pobj->x are the same</span>
</pre>
<h2 style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
C++ example</h2>
As a slightly more realistic program in C++: a class in its own header (IPv4.h) and implementation (IPv4.cpp) and a program which uses the class functionality. The class converts an IP address in integer format to the known quad format.<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
IPv4 class</h3>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
IPv4.h:</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"><span class="pp" style="color: #d55500;">#ifndef</span> IPV4_H
<span class="pp" style="color: #d55500;">#define</span> IPV4_H
<span class="pp" style="color: #d55500;">#include</span> <string>
<span class="keyword" style="color: blue;">namespace</span> GenericUtils { <span class="cmt" style="background-color: transparent; color: #000040;">// create a namespace
</span><span class="keyword" style="color: blue;">class</span> IPv4 { <span class="cmt" style="background-color: transparent; color: #000040;">// class definition
</span><span class="keyword" style="color: blue;">public</span>:
IPv4(); ~IPv4();
std::string IPint_to_IPquad(<span class="keyword" style="color: blue;">unsigned</span> <span class="keyword" style="color: blue;">long</span> ip);<span class="cmt" style="background-color: transparent; color: #000040;">// member interface
</span>};
} <span class="cmt" style="background-color: transparent; color: #000040;">//namespace GenericUtils</span>
<span class="pp" style="color: #d55500;">#endif</span> <span class="cmt" style="background-color: transparent; color: #000040;">// IPV4_H
</span></pre>
<h4 style="background-color: transparent; color: #000040; font-style: italic; font-weight: normal; letter-spacing: 0.07em; line-height: 1em; margin: 1em 0px 0.5em;">
IPv4.cpp:</h4>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"><span class="pp" style="color: #d55500;">#include</span> "IPv4.h"
<span class="pp" style="color: #d55500;">#include</span> <string>
<span class="pp" style="color: #d55500;">#include</span> <sstream>
<span class="keyword" style="color: blue;">using</span> <span class="keyword" style="color: blue;">namespace</span> std; <span class="cmt" style="background-color: transparent; color: #000040;">// use the namespaces
</span><span class="keyword" style="color: blue;">using</span> <span class="keyword" style="color: blue;">namespace</span> GenericUtils;
IPv4::IPv4() {} <span class="cmt" style="background-color: transparent; color: #000040;">// default constructor/destructor
</span>IPv4::~IPv4() {}
string IPv4::IPint_to_IPquad(<span class="keyword" style="color: blue;">unsigned</span> <span class="keyword" style="color: blue;">long</span> ip) { <span class="cmt" style="background-color: transparent; color: #000040;">// member implementation
</span> ostringstream ipstr; <span class="cmt" style="background-color: transparent; color: #000040;">// use a stringstream
</span> ipstr << ((ip &0xff000000) >> 24) <span class="cmt" style="background-color: transparent; color: #000040;">// Bitwise right shift
</span> << "." << ((ip &0x00ff0000) >> 16)
<< "." << ((ip &0x0000ff00) >> 8)
<< "." << ((ip &0x000000ff));
<span class="keyword" style="color: blue;">return</span> ipstr.str();
}
</pre>
<h3 style="background-color: transparent; color: #000040; font-size: 14px; letter-spacing: 0.07em; line-height: 1em;">
The program simplecpp.cpp</h3>
<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"><span class="pp" style="color: #d55500;">#include</span> "IPv4.h"
<span class="pp" style="color: #d55500;">#include</span> <iostream>
<span class="pp" style="color: #d55500;">#include</span> <string>
<span class="keyword" style="color: blue;">using</span> <span class="keyword" style="color: blue;">namespace</span> std;
<span class="keyword" style="color: blue;">int</span> main (<span class="keyword" style="color: blue;">int</span> argc, <span class="keyword" style="color: blue;">char</span>* argv[]) {
string ipstr; <span class="cmt" style="background-color: transparent; color: #000040;">// define variables
</span> <span class="keyword" style="color: blue;">unsigned</span> <span class="keyword" style="color: blue;">long</span> ipint = 1347861486; <span class="cmt" style="background-color: transparent; color: #000040;">// The IP in integer form</span>
GenericUtils::IPv4 iputils; <span class="cmt" style="background-color: transparent; color: #000040;">// create an object of the class
</span> ipstr = iputils.IPint_to_IPquad(ipint); <span class="cmt" style="background-color: transparent; color: #000040;">// call the class member
</span> cout << ipint << " = " << ipstr << endl; <span class="cmt" style="background-color: transparent; color: #000040;">// print the result</span>
<span class="keyword" style="color: blue;">return</span> 0;
}
</pre>
Compile and execute with:<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-before: avoid;"># g++ -c IPv4.cpp simplecpp.cpp <span class="cmt" style="background-color: transparent; color: #000040;"># Compile in objects</span>
# g++ IPv4.o simplecpp.o -o simplecpp.exe <span class="cmt" style="background-color: transparent; color: #000040;"># Link the objects to final executable</span>
# ./simplecpp.exe
1347861486 = 80.86.187.238
</pre>
Use <code style="color: #003300;">ldd</code> to check which libraries are used by the executable and where they are located. Also used to check if a shared library is missing or if the executable is static.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em;"># ldd /sbin/ifconfig <span class="cmt" style="background-color: transparent; color: #000040;"># list dynamic object dependencies</span>
# ar rcs staticlib.a *.o <span class="cmt" style="background-color: transparent; color: #000040;"># create static archive</span>
# ar t staticlib.a <span class="cmt" style="background-color: transparent; color: #000040;"># print the objects list from the archive</span>
# ar x /usr/lib/libc.a version.o <span class="cmt" style="background-color: transparent; color: #000040;"># extract an object file from the archive</span>
# nm version.o <span class="cmt" style="background-color: transparent; color: #000040;"># show function members provided by object</span>
</pre>
<h2 id="makefile" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Simple Makefile</h2>
The minimal Makefile for the multi-source program is shown below. The lines with instructions <i>must begin with a tab</i>! The back slash "\" can be used to cut long lines.<pre style="background-color: #f6f6fc; color: #003300; padding: 0.1em 0em 0.1em 1em; page-break-inside: avoid;"><span class="pp" style="color: #d55500;">CC</span> = g++
<span class="pp" style="color: #d55500;">CFLAGS</span> = -O
<span class="pp" style="color: #d55500;">OBJS</span> = IPv4.o simplecpp.o
<span class="keyword" style="color: blue;">simplecpp</span>: ${OBJS}
${CC} -o simplecpp ${CFLAGS} ${OBJS}
<span class="keyword" style="color: blue;">clean</span>:
rm -f ${TARGET} ${OBJS}
</pre>
</div>
<div id="onlinehelp" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
<h1 style="background-color: #000040; color: white; counter-reset: section 0; font-family: verdana, sans-serif; font-size: 22px; letter-spacing: 0.15em; text-transform: uppercase;">
<a href="">ONLINE HELP</a></h1>
<h2 id="documentation" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Documentation</h2>
<table><tbody>
<tr><td><a href="http://en.tldp.org/" style="background-color: transparent; color: #000040;">Linux Documentation</a></td><td>en.tldp.org</td></tr>
<tr><td><a href="http://www.linuxmanpages.com/" style="background-color: transparent; color: #000040;">Linux Man Pages</a></td><td>www.linuxmanpages.com</td></tr>
<tr><td><a href="http://www.oreillynet.com/linux/cmd/" style="background-color: transparent; color: #000040;">Linux commands directory</a></td><td>www.oreillynet.com/linux/cmd</td></tr>
<tr><td><a href="http://linux.die.net/" style="background-color: transparent; color: #000040;">Linux doc man howtos</a></td><td>linux.die.net</td></tr>
<tr><td><a href="http://www.freebsd.org/handbook/" style="background-color: transparent; color: #000040;">FreeBSD Handbook</a></td><td>www.freebsd.org/handbook</td></tr>
<tr><td><a href="http://www.freebsd.org/cgi/man.cgi" style="background-color: transparent; color: #000040;">FreeBSD Man Pages</a></td><td>www.freebsd.org/cgi/man.cgi</td></tr>
<tr><td><a href="http://www.freebsdwiki.net/" style="background-color: transparent; color: #000040;">FreeBSD user wiki</a></td><td>www.freebsdwiki.net</td></tr>
<tr><td><a href="http://docs.sun.com/app/docs/coll/40.10" style="background-color: transparent; color: #000040;">Solaris Man Pages</a></td><td>docs.sun.com/app/docs/coll/40.10</td></tr>
</tbody></table>
<h2 id="crossref" style="background-color: transparent; color: #000040; font-family: verdana, sans-serif; font-size: 17px; letter-spacing: 0.1em;">
Other Unix/Linux references</h2>
<table><tbody>
<tr><td><a href="http://bhami.com/rosetta.html" style="background-color: transparent; color: #000040;">Rosetta Stone for Unix</a></td><td>bhami.com/rosetta.html (a Unix command translator)</td></tr>
<tr><td><a href="http://unixguide.net/unixguide.shtml" style="background-color: transparent; color: #000040;">Unix guide cross reference</a></td><td>unixguide.net/unixguide.shtml</td></tr>
<tr><td><a href="http://www.linuxcmd.org/" rel="nofollow" style="background-color: transparent; color: #000040;">Linux commands line list</a></td><td>www.linuxcmd.org</td></tr>
<tr><td><a href="http://www.pixelbeat.org/cmdline.html" rel="nofollow" style="background-color: transparent; color: #000040;">Short Linux reference</a></td><td>www.pixelbeat.org/cmdline.html</td></tr>
<tr><td><a href="http://www.shell-fu.org/" style="background-color: transparent; color: #000040;">Little command line goodies</a></td><td>www.shell-fu.org</td></tr>
</tbody></table>
</div>
<div class="last" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px; padding-top: 5em;">
That's all folks!</div>
<div class="footerlast" style="background-color: white; font-family: verdana, arial, sans-serif; font-size: 14px;">
This document: "Unix Toolbox revision 14.4" is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="nofollow" style="background-color: transparent; color: #000040;">Creative Commons Licence [Attribution - Share Alike]</a>. © <a href="mailto:c_at_cb.vu" style="background-color: transparent; color: #000040;">Colin Barschel</a> 2007-2012. Some rights reserved.</div>
Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com1tag:blogger.com,1999:blog-658947996677319057.post-43220107697598160912012-12-07T20:50:00.000+08:002012-12-07T20:50:28.243+08:002012 澳門之旅 Day3第三天依舊是行程滿滿,要去市區吃葡式大餐,要去松山公園看燈塔,要去MGM看蝴蝶館,還要再趕回飯店拿行李準備搭機回台。完全是把握最後機會趕行程的方式阿<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-CQTcC_E7ySw/T59msdsFZJI/AAAAAAAAB0U/82oED2wB0jY/s1600/uhdsXvOHts62z0Ok2FiikPcvUtKU%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-CQTcC_E7ySw/T59msdsFZJI/AAAAAAAAB0U/82oED2wB0jY/s1600/uhdsXvOHts62z0Ok2FiikPcvUtKU%253D.gif" /></a></div>
<br />
<br />
<a name='more'></a><br /><br />
出發前先準備Check-Out,當然要把握機會跟飯店小姐合照一下,真的好高阿 ~~<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-M6bnL7g/0/L/IMG_7105-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-M6bnL7g/0/L/IMG_7105-L.jpg" width="426" /></a></div>
<br />
然後也一定要比較一下澳門麥當勞的好立克口味聖代跟台灣哪個好吃?<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-VJvQ7TW/0/XL/IMG_7108-XL.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-VJvQ7TW/0/XL/IMG_7108-XL.jpg" width="640" /></a></div>
<br />
吃完甜點,就可以出發到澳門市區,這次的餐廳是在議事亭前地附近的大堂街八號的ESCADA葡國餐廳。點了章魚沙拉、馬介休球、非洲雞。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-jKNr7n7/0/L/IMG_7115-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-jKNr7n7/0/L/IMG_7115-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-wJb4qzW/0/L/IMG_7118-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-wJb4qzW/0/L/IMG_7118-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-xCNcV8W/0/L/IMG_7122-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-xCNcV8W/0/L/IMG_7122-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-2w3z6sZ/0/L/IMG_7134-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-2w3z6sZ/0/L/IMG_7134-L.jpg" width="640" /></a></div>
<br />
章魚沙拉的章魚蠻新鮮的,微酸的口感與一點點蒜味配上有嚼勁的新鮮章魚,是很開胃的一道菜。馬介休就是醃漬過的鱈魚,馬介休球也就是醃鱈魚口味的可樂餅這樣,還不錯吃。至於主菜非洲雞,是重口味的烤雞作法,微辣的醬料加上烤得剛剛好的雞肉,真是好吃阿,沒兩下就被吃光光了。<br />
<br />
吃飽飯以後,先去松山市政公園攀岩消化一下。雖然是大中午的一兩點熱得要命,但是還是可以看到好幾個人在慢跑,難道他們是在進行耐熱訓練嗎?<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-2D6XJkC/0/L/IMG_7152-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-2D6XJkC/0/L/IMG_7152-L.jpg" width="640" /></a></div>
<br />
在大太陽底下走了半天,終於抵達了東望洋砲台。熱得要死的天氣,趕快躲進小小的展覽室吹冷氣,好不容易涼一點了,一出門口馬上又汗流浹背了。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-2qA5rqcEPaY/T59mwsESx3I/AAAAAAAAB1I/pj8r_FoTyX8/s1600/xnhJtGH8q5VTu4%252B2Bh46UupJU2U%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-2qA5rqcEPaY/T59mwsESx3I/AAAAAAAAB1I/pj8r_FoTyX8/s1600/xnhJtGH8q5VTu4%252B2Bh46UupJU2U%253D.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-4PNT8Wz/0/L/IMG_7160-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-4PNT8Wz/0/L/IMG_7160-L.jpg" width="640" /></a></div>
<br />
走了半天,肚子也差不多消化完了,馬上衝下山到有名的玫瑰咖啡室吃辣魚公仔麵,再去光輝咖啡室吃豬扒包。辣魚公仔麵真的好吃ㄟ,雖然只是泡麵加上罐頭沙丁魚,但是好吃到差點買了辣魚罐頭回台灣。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-pgBNvS8/0/L/IMG_7164-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-pgBNvS8/0/L/IMG_7164-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-HFzrc6v/0/L/IMG_7173-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-HFzrc6v/0/L/IMG_7173-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-mxQLXKN/0/L/IMG_7180-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120910-%E6%BE%B3%E9%96%80-Day3/i-mxQLXKN/0/L/IMG_7180-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-ppLLnBR/0/L/IMG_7190-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-ppLLnBR/0/L/IMG_7190-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
最後到了MGM的蝴蝶館來看蝴蝶,小小的玻璃屋裡面,養了很多蝴蝶,但是可能因為人潮太多,所以蠻多蝴蝶都是有氣無力的樣子,有些更是奄奄一息,蠻可惜的。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-5pFmCbG/0/L/IMG_7236-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-5pFmCbG/0/L/IMG_7236-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-nGr5tV3/0/L/IMG_7265-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-nGr5tV3/0/L/IMG_7265-L.jpg" width="640" /></a></div>
<br />
看完蝴蝶館就要回飯店拿行李準備搭機回台灣了,最後在飯店的美食街,拍了一張這次旅行的遺憾照.....<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-dZD9B69/0/L/IMG_7305-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120910-%E6%BE%B3%E9%96%80-Day3/i-dZD9B69/0/L/IMG_7305-L.jpg" width="640" /></a></div>
<br />
是的,好不容易到了港仔的地盤,竟然沒吃到港式燒臘,真是太可惜了。<br />
<br />Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-55064946697678430492012-12-07T20:06:00.000+08:002012-12-07T20:50:28.261+08:002012 澳門之旅 Day2澳門的第二天,早上搭公車到路環去吃安德魯蛋塔,逛動物園看熊貓。<br />
天氣還是一樣的熱,早上的太陽就足以把人曬出一身汗....<br />
中午回到氹仔舊城官也街吃午餐買手信,最後就去逛逛威尼斯人,準備欣賞晚上的水舞間演出囉。<br />
<br />
<a name='more'></a><br />
安德魯蛋塔本店,跟瑪嘉烈一樣,小小的店,一點都沒有國際名牌的架子 XD 個人感覺比瑪嘉烈好吃,可能是因為肚子比較餓,或是太陽還沒那麼大沒那麼曬,心情比較好的關係<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-WNU0r-BEemQ/T59mVnrhg5I/AAAAAAAABwg/r7nZ9P1FGME/s1600/UYIshbj522FKlKPjIBcG6xMcxenA%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-WNU0r-BEemQ/T59mVnrhg5I/AAAAAAAABwg/r7nZ9P1FGME/s1600/UYIshbj522FKlKPjIBcG6xMcxenA%253D.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-WmGZ6Xn/0/L/IMG_6235-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-WmGZ6Xn/0/L/IMG_6235-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-9xcSrxp/0/L/IMG_6239-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-9xcSrxp/0/L/IMG_6239-L.jpg" width="640" /></a></div>
<br />
吃完蛋塔,附近閒晃一下,就搭公車往石排灣郊野公園去看熊貓了,運氣還不錯的是,抵達的時間大約十點半,剛好是熊貓的進食時間,所以可以看到其中一隻比較活躍的樣子,另外一隻可能已經吃飽了,所以一直懶洋洋的趴著<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-2D3Qw3v/0/L/IMG_6291-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-2D3Qw3v/0/L/IMG_6291-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-Mc7bPKK/0/L/IMG_6320-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-Mc7bPKK/0/L/IMG_6320-L.jpg" width="640" /></a></div>
<br />
熊貓進食影片<br />
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2253342708_Dct5D9T?width=640&height=360&albumId=26887650&albumKey=PXtHb2" width="640"></iframe><br />
<br />
這兩隻熊貓叫做開開、心心,我覺得應該可以叫賭神、賭聖,才比較符合澳門風阿。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-J-PzMJatNZA/T59mB_HKqHI/AAAAAAAABt4/AnrlNVdzXpU/s1600/6IB0p2VuvtG6sJiCFZ6tng3wL4s%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-J-PzMJatNZA/T59mB_HKqHI/AAAAAAAABt4/AnrlNVdzXpU/s1600/6IB0p2VuvtG6sJiCFZ6tng3wL4s%253D.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-2FP8XnW/0/L/IMG_6331-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-2FP8XnW/0/L/IMG_6331-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-TNdNH2z/0/L/IMG_6334-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-TNdNH2z/0/L/IMG_6334-L.jpg" width="640" /></a></div>
<br />
看完熊貓,搭車輾轉回到氹仔舊城官也街一帶吃午餐。走來走去,最後選了間小有名氣的山度士葡國餐廳吃午餐。<br />
老闆~!! 放開那個小女孩~~~!!!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-NDDcCtM/0/L/IMG_6394-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-NDDcCtM/0/L/IMG_6394-L.jpg" width="640" /></a></div>
<br />
在這邊吃了一小份烤乳豬當午餐,這個強擄小女孩老闆的烤乳豬其實還蠻好吃的啦 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120909-%E6%BE%B3%E9%96%80-Day2/i-5Xs5tSx/0/L/IMG_6388-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120909-%E6%BE%B3%E9%96%80-Day2/i-5Xs5tSx/0/L/IMG_6388-L.jpg" width="640" /></a></div>
<br />
吃完到龍環葡韻住宅博物館逛逛,消化一下<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-Fhch365/0/L/IMG_6400-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-Fhch365/0/L/IMG_6400-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-GTjczCn/0/L/IMG_6402-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-GTjczCn/0/L/IMG_6402-L.jpg" width="640" /></a></div>
<br />
有好幾間都可以開放參觀裡面葡萄牙人舊時的生活空間<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-gmmwzLN/0/L/IMG_6409-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-gmmwzLN/0/L/IMG_6409-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-pbtGNTZ/0/L/IMG_6410-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-pbtGNTZ/0/L/IMG_6410-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-H3rCsx2/0/L/IMG_6412-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-H3rCsx2/0/L/IMG_6412-L.jpg" width="640" /></a></div>
<br />
準備離開的時候,發現外面有三輪車可以騎,立馬跨上去展現刻苦討生活的情景<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120909-%E6%BE%B3%E9%96%80-Day2/i-6vxpv5g/0/L/IMG_6434-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120909-%E6%BE%B3%E9%96%80-Day2/i-6vxpv5g/0/L/IMG_6434-L.jpg" width="640" /></a></div>
<br />
騎完車以後,中午那營養不良的烤乳豬也消化的差不多了,回到市區開始吃點心、買手信。<br />
先來個沙度娜木糠布丁,買了一個綜合口味的,左邊就是木糠,右邊是藍莓。嗯....有特色,有興趣的可以試試嘗鮮,不過我自己是覺得普普就是了<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-9VgQmd8/0/L/IMG_6443-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-9VgQmd8/0/L/IMG_6443-L.jpg" width="640" /></a></div>
<br />
然後買了一堆晃記的杏仁酥,排隊也是排很久<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-hb2RBcx/0/L/IMG_6435-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-hb2RBcx/0/L/IMG_6435-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-6h3S7QS/0/L/IMG_6437-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-6h3S7QS/0/L/IMG_6437-L.jpg" width="640" /></a></div>
<br />
買了大包小包的戰利品以後,先搭接駁車回飯店放好,休息沒多久,就搭車往威尼斯人去看看室內運河了 ,這個女船夫邊唱歌還邊跟拍照的我揮手。提醒大家,唱歌不開船,開船不唱歌。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-bdXHhzX/0/L/IMG_6494-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-bdXHhzX/0/L/IMG_6494-L.jpg" width="640" /></a></div>
<br />
運河不是重點,重點是還有辣妹表演國樂<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-BjFBkD4/0/L/IMG_6540-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-BjFBkD4/0/L/IMG_6540-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-XsTR3ZF/0/L/IMG_6544-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-XsTR3ZF/0/L/IMG_6544-L.jpg" width="640" /></a></div>
<br />
新濠天地HardRock飯店的加長禮車,真的很長 XD,應該跟公車差不多長了。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-SsVsBt5/0/L/IMG_6546-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-SsVsBt5/0/L/IMG_6546-L.jpg" width="640" /></a></div>
<br />
到新濠天地就是為了要看水舞間囉,附上兩小段影片檔,至於照片的部分都在這邊 (<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/26553877_xxjXDd#!i=2219120263&k=Xzvv8FQ" target="_blank">點我</a>)<br />
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2253366610_cnCnwnL?width=640&height=360&noshare&nohome" width="640"></iframe><br />
<br />
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2253381067_mXCjZTj?width=640&height=360&noshare&nohome" width="640"></iframe><br />
<br />
整個水舞間表演長度大約一個半小時,劇情其實沒啥特殊的,但是當成馬戲團表演來看的話還不錯,尤其是整個舞台效果還蠻驚人的,也難怪常常都是滿座的狀況。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-9kQZpL4/0/L/IMG_6621-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-9kQZpL4/0/L/IMG_6621-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-WDfZV5f/0/L/IMG_6658-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-WDfZV5f/0/L/IMG_6658-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-vXdWgNN/0/L/IMG_6795-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-vXdWgNN/0/L/IMG_6795-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-MLQ8BhW/0/L/IMG_6923-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-MLQ8BhW/0/L/IMG_6923-L.jpg" width="640" /></a></div>
<br />
看完水舞間,肚子也差不多餓了,所以又衝到澳門島市區,去吃鼎鼎有名的皇冠小館,點了一個水蟹粥,跟蝦籽撈麵,都蠻好吃的。水蟹粥就是螃蟹囉,雖然價錢也不是很便宜,但是整整一隻螃蟹還蠻有誠意的啦,蝦籽撈麵就是乾蝦卵配上撈麵,蠻有特色的,台灣好像還沒吃過這樣的東西,不過兩種都是偏重口味偏鹹,要多配點水就是了。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-fsMQsxv/0/L/IMG_7019-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-fsMQsxv/0/L/IMG_7019-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-vmShL9p/0/L/IMG_7024-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-vmShL9p/0/L/IMG_7024-L.jpg" width="640" /></a></div>
<br />
好不容易來到市區,怎麼可能只吃了一個皇冠小館就回飯店睡覺呢?所以又去吃了彪記腸粉,這次吃了一個腸粉跟忘了甚麼粥的。因為白粥賣完了,只好點比較貴一點的另一種粥,上面放了一點干貝絲,喝起來還蠻鮮的,有大海的味道 XD,另外腸粉也跟台灣口味不太一樣,腸粉本身是比較偏硬的口感,淋醬則是花生醬加醬油膏,這也是另一種台灣還沒吃過的口味,兩種東西都也都還不錯,只可惜可能因為快關門休息了,店員的臉色不是很好,大該是今天加班加太久了吧。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-BR7jLR7/0/L/IMG_7040-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-BR7jLR7/0/L/IMG_7040-L.jpg" width="426" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-hh9Hvn8/0/L/IMG_7042-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-hh9Hvn8/0/L/IMG_7042-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120909-%E6%BE%B3%E9%96%80-Day2/i-gQTmRM7/0/L/IMG_7028-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120909-%E6%BE%B3%E9%96%80-Day2/i-gQTmRM7/0/L/IMG_7028-L.jpg" width="640" /></a></div>
<br />
吃飽以後散步去永利,本來要看噴水池的水舞,可惜正在系統升級,要迎接對岸的光輝十月,所以只能看看富貴龍跟永生樹了。<br />
天頂十二生肖圖騰<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-TnH7Fn9/0/L/IMG_7052-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-TnH7Fn9/0/L/IMG_7052-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
地上的12宮,其中的處女座</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-SVQ9qnX/0/L/IMG_7051-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-SVQ9qnX/0/L/IMG_7051-L.jpg" width="640" /></a></div>
<br />
富貴龍<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-s6cD8ZM/0/L/IMG_7078-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120909-%E6%BE%B3%E9%96%80-Day2/i-s6cD8ZM/0/L/IMG_7078-L.jpg" width="640" /></a></div>
<br />
影片檔:富貴龍是小DC拍的,永生樹用7D拍的<br />
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2253464250_n875SPZ?width=640&height=360&noshare&nohome" width="640"></iframe><br />
<br />
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2177663258_4T58jWr?width=640&height=360&noshare&nohome" width="640"></iframe><br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-73074111816128338712012-12-05T16:33:00.004+08:002012-12-07T20:50:28.262+08:002012 澳門之旅 Day1<br />
距離不遠的澳門,找了個週末,多請一天假,就排了一個澳門三天遊。<br />
訂好機加酒的票(長榮航空+澳門銀河=每位費用 NT16300)<br />
順便訂了貴森森的水舞間票(網路訂票台北富邦信用卡折扣 MOP 612)<br />
就給他出發啦~~<br />
<br />
<br />
<a name='more'></a><br />
<br />
到了澳門機場,等飯店接駁車的空檔,跟銀河飯店的接機小弟拍張照<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-W9XjtPS/0/L/IMG_5497-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-W9XjtPS/0/L/IMG_5497-L.jpg" width="425" /></a></div>
<br />
也跟櫃檯妹妹拍張照<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-4VTFhvw/0/L/IMG_5508-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-4VTFhvw/0/L/IMG_5508-L.jpg" width="640" /></a></div>
<br />
拍完照寄放行李之後撘著接駁車往澳門島市區去,到了市區先來排隊買瑪嘉烈蛋塔<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-kNQR3fr/0/L/IMG_5532-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-kNQR3fr/0/L/IMG_5532-L.jpg" width="424" /></a></div>
<br />
排了20分鐘,終於拿到熱騰騰的蛋塔<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-7LJLmsJ/0/L/IMG_5533-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-7LJLmsJ/0/L/IMG_5533-L.jpg" width="424" /></a></div>
<br />
吃完了蛋塔沿著新馬路到了議事亭前地<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-8nhtZGL/0/L/IMG_5541-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-8nhtZGL/0/L/IMG_5541-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-cXdH8Qx/0/L/IMG_5555-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-cXdH8Qx/0/L/IMG_5555-L.jpg" width="640" /></a></div>
<br />
有人搭人力三輪車逛街,真好命<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-qHBBhzC/0/L/IMG_5552-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-qHBBhzC/0/L/IMG_5552-L.jpg" width="640" /></a></div>
<br />
議事亭前地晃了一圈,找到了鳳城珠記麵家,來碗澳門口味的雲吞跟水餃,吃起來跟台灣的雲吞水餃不一樣,反而比較像是貢丸類的口感,並不難吃,但是也沒有到驚艷的地步,當作台灣一般的貢丸麵、餛飩麵填飽肚子就好了。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-jH2cVWr/0/L/IMG_5542-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-jH2cVWr/0/L/IMG_5542-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-jK2dKSz/0/L/IMG_5544-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-jK2dKSz/0/L/IMG_5544-L.jpg" width="640" /></a></div>
<br />
酒足飯飽,繼續逛街去,先來到聖母玫瑰堂<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-HRrJBwk/0/L/IMG_5572-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-HRrJBwk/0/L/IMG_5572-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-XLf2dmt/0/L/IMG_5575-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-XLf2dmt/0/L/IMG_5575-L.jpg" width="424" /></a></div>
<br />
裡面二樓有一些古文物的展覽,其中還有一個嬌羞的耶穌,我是沒有研究爲什麼會那麼嬌羞,可能是因為沒有穿衣服的關係吧 <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Oz_uxZl8aMM/T59mp0F-4VI/AAAAAAAABzw/rqio8Pm_fMM/s1600/ruzu0m4ABIaOqNZfG86UXzEShq4%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Oz_uxZl8aMM/T59mp0F-4VI/AAAAAAAABzw/rqio8Pm_fMM/s1600/ruzu0m4ABIaOqNZfG86UXzEShq4%253D.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-wPxHfrp/0/L/IMG_5578-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-wPxHfrp/0/L/IMG_5578-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-wMMFHpx/0/L/IMG_5581-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-wMMFHpx/0/L/IMG_5581-L.jpg" width="424" /></a></div>
<br />
附近的另一個教堂 - 大堂(主教堂座),進去裡面躲太陽,不過沒冷氣,還是很熱<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-5BLK83Z/0/L/IMG_5585-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-5BLK83Z/0/L/IMG_5585-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-bJqZ9Gw/0/L/IMG_5587-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-bJqZ9Gw/0/L/IMG_5587-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-StXSWmJ/0/L/IMG_5588-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-StXSWmJ/0/L/IMG_5588-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-9c4f5Qg/0/L/IMG_5589-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-9c4f5Qg/0/L/IMG_5589-L.jpg" width="424" /></a></div>
<br />
盧家大屋,看看以前有錢人家的房子,看看能不能沾點財運 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-ntTPvRG/0/L/IMG_5602-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-ntTPvRG/0/L/IMG_5602-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-hqqgPJx/0/L/IMG_5596-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-hqqgPJx/0/L/IMG_5596-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-MWQSbZ5/0/L/IMG_5603-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-MWQSbZ5/0/L/IMG_5603-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-srWknH9/0/L/IMG_5605-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-srWknH9/0/L/IMG_5605-L.jpg" width="640" /></a></div>
<br />
繼續往大三巴前進的路上,買了雇用超齡老人當活招牌的潘榮記金錢餅,配上苦死人不償命的大聲公涼茶。金錢餅還不錯,微微的蛋香、麵粉香,像是薄片版的雞蛋糕。至於涼茶,嗯...我只喝了一口就不喝了 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-G9T7jMJ/0/L/IMG_5612-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-G9T7jMJ/0/L/IMG_5612-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-549KT9x/0/L/IMG_5625-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-549KT9x/0/L/IMG_5625-L.jpg" width="640" /></a></div>
<br />
熱死人的天氣下,經過人擠人的大三巴名產街,終於走到了聞名中外的大三巴牌坊,剛好有人在表演舞獅。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-4PpVrTP/0/L/IMG_5653-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-4PpVrTP/0/L/IMG_5653-L.jpg" width="640" /></a></div>
<br />
我跳~~<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-NXr5zMs/0/L/IMG_5664-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-NXr5zMs/0/L/IMG_5664-L.jpg" width="640" /></a></div>
<br />
順手用DC錄了一小段<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2253331849_fzWWSt7?width=640&height=360&noshare&nohome" width="640"></iframe></div>
<br />
看完舞獅,來到大三巴牌坊下<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-4RPZhC6/0/L/IMG_5725-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-4RPZhC6/0/L/IMG_5725-L.jpg" width="640" /></a></div>
<br />
牌坊旁大砲台花園的,公園內有條"砲兵馬路",有一堆砲台,還有澳門博物館<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-K2pjWZS/0/L/IMG_5727-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-K2pjWZS/0/L/IMG_5727-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-hL6xGMZ/0/L/IMG_5734-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-hL6xGMZ/0/L/IMG_5734-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
來個炮打葡京,希望這兩天有機會試手氣的話,不要慘敗 XD</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-rkjPtPG/0/L/IMG_5730-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-rkjPtPG/0/L/IMG_5730-L.jpg" width="424" /></a></div>
<br />
走下公園,來到大三巴另一側(大三巴右街)的哪咤廟<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-FsRsW2x/0/L/IMG_5757-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-FsRsW2x/0/L/IMG_5757-L.jpg" width="424" /></a></div>
<br />
逛得差不多了,肚子也餓了,先來一碗很難找的楊六記牛雜開開胃,真的好吃,不過也真的不好找。早早認輸拿地圖地址問當地人比較快。爲什麼老闆看起來跟我合照不太開心,明明我問他可不可以一起拍照的時候,他很高興的說可以阿?<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-zTTDGLV/0/L/IMG_5770-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-zTTDGLV/0/L/IMG_5770-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-wdg3TFG/0/L/IMG_5773-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-wdg3TFG/0/L/IMG_5773-L.jpg" width="640" /></a></div>
<br />
吃完開胃牛雜粥,趕著六點前去勝利茶餐廳吃下午茶豬扒包套餐,再加一個楓糖士多。不過豬扒包一上來就被我吃快光了,才想到要拍照<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-bMSMC0fDFPM/T59mu2TQaSI/AAAAAAAAB0w/f7bLf954azk/s1600/vEcEh2FVfWFkoA8q3CJRDu65YxVQ%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-bMSMC0fDFPM/T59mu2TQaSI/AAAAAAAAB0w/f7bLf954azk/s1600/vEcEh2FVfWFkoA8q3CJRDu65YxVQ%253D.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-rLg22Qt/0/L/IMG_5776-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Mimi/2012/20120908-%E6%BE%B3%E9%96%80-Day1/i-rLg22Qt/0/L/IMG_5776-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-96HjW9L/0/L/IMG_5779-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-96HjW9L/0/L/IMG_5779-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-F63Zkrz/0/L/IMG_5786-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-F63Zkrz/0/L/IMG_5786-L.jpg" width="640" /></a></div>
<br />
吃飽了以後,走回葡京前拍拍葡京的門神、夜景,就準備回飯店休息,晚上還有澳門煙火節得要站兩個小時看煙火<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-9NKj2qt/0/L/IMG_5794-L.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-9NKj2qt/0/L/IMG_5794-L.jpg" width="265" /></a></div>
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-FbxQMhv/0/L/IMG_5795-L.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-FbxQMhv/0/L/IMG_5795-L.jpg" width="265" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-8nCKdpf/0/L/IMG_5800-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-8nCKdpf/0/L/IMG_5800-L.jpg" width="424" /></a></div>
<br />
看煙火的地點在氹仔的海洋花園大馬路邊,由於整條路很長,這天的韓國跟泰國,知名度應該也不高,所以雖然有點人潮,不過跟台灣人擠人看煙火的程度比起來,大約是圍觀馬拉松路跑的人數而已,所以也不用特別早來搶位置,我們八點半到路邊,還是有地方立了兩隻腳架。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-VQvCLBc/0/L/IMG_5807-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-VQvCLBc/0/L/IMG_5807-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-5TmK6QZ/0/L/IMG_5812-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-5TmK6QZ/0/L/IMG_5812-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-hTH8Hd3/0/L/IMG_5811-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-hTH8Hd3/0/L/IMG_5811-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-2nKg7GS/0/L/IMG_5926-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-2nKg7GS/0/L/IMG_5926-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-8fgvQ4q/0/L/IMG_6011-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-8fgvQ4q/0/L/IMG_6011-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-dk5znGB/0/L/IMG_6128-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-dk5znGB/0/L/IMG_6128-L.jpg" width="640" /></a></div>
<br />
所有煙火的照片可以從這邊 <b> <a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/26553866_CzjPf8#!i=2219120383&k=K2sPDFZ" target="_blank">(點我)</a> </b>看<br />
另外附上兩段煙火完整錄影檔<br />
韓國<br />
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2253457099_cqsrKRP?width=640&height=360&noshare&nohome" width="640"></iframe><br />
泰國<br />
<iframe frameborder="0" height="360" scrolling="no" src="http://api.smugmug.com/services/embed/2253490825_9j5VxNN?width=640&height=360&noshare&nohome" width="640"></iframe><br />
<br />
看完煙火本來想搭公車回飯店,但是人潮眾多,加上疑似走錯方向 XD<br />
所以就搭小黃回飯店,順便省點時間,可以在飯店外拍拍夜景。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-st3zr9d/0/L/IMG_6206-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-st3zr9d/0/L/IMG_6206-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-xXVvfjL/0/L/IMG_6211-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-xXVvfjL/0/L/IMG_6211-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-npgJ5WP/0/L/IMG_6212-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-npgJ5WP/0/L/IMG_6212-L.jpg" width="424" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-fPvFVHv/0/L/IMG_6222-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20120908-%E6%BE%B3%E9%96%80-Day1/i-fPvFVHv/0/L/IMG_6222-L.jpg" width="640" /></a></div>
<br />
<br />Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-10909151281645197032012-06-20T16:57:00.000+08:002012-06-20T17:04:46.890+08:002012 TOUTH RUNNER 啦卡越野路跑賽 路線與心得繼上次的 <a href="http://blog.jake.idv.tw/2012/05/salomon-x-trail-run-route.html" target="_blank">2012 Salomon X-Trail 越野跑</a> 之後,當時失心瘋的結果,所以也報名了2012 TOUTH RUNNER 啦卡越野路跑賽,官網在:<a href="http://www.dothan.com.tw/toughrunner/info.html"> http://www.dothan.com.tw/toughrunner/info.html</a><br />
<br />
<br />
<a name='more'></a><br />
<br />
照例先來看看路線與高度圖<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-FRTsCJz/0/L/map-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="437" src="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-FRTsCJz/0/L/map-L.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-ws573sQ/0/L/ToughRunner2-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="349" src="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-ws573sQ/0/L/ToughRunner2-L.jpg" width="640" /></a></div><br />
<br />
因為接駁車每人要價200大洋,而我們又有三個人要搭車,所以選擇了自行開車,省下六百大洋的接駁車費用。雖然自己開車也沒能多睡,一樣三點半就得出發,大約五點抵達停車場旁停好車子,再搭乘免費接駁專車到烏來運動場。<br />
<br />
<br />
前一天台北還下著淹水大雨,6/17當天卻是一個怡人適合跑步的好天氣,真是感謝老天爺阿。抵達會場,參賽者陸陸續續進入烏來運動場,兩三千人散佈在小小運動場,還蠻壯觀的。<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-wbRhZLd/0/L/IMAG0585-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="361" src="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-wbRhZLd/0/L/IMAG0585-L.jpg" width="640" /></a></div><br />
<br />
身為一個盡責的觀光客,當然要跟現場的舞台標語來個到此一遊照。<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-FDQnvzm/0/L/IMAG0582-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="361" src="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-FDQnvzm/0/L/IMAG0582-L.jpg" width="640" /></a></div><br />
<br />
拍完旅遊風景照,換裝準備完成後,也差不多接近起跑的時候了,舞台上這時開始帶領大家做暖身,而且是原住民版的歌舞暖身 XD。讓大家看看笨拙又不認真版的暖身操。<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-CqSOQi4jM1A/T59mPnth2SI/AAAAAAAABvo/Y4ZSlLqmpGo/s1600/RCC3uHlbehTUeo16v2F8PxcY5UjE%253D.gif" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://2.bp.blogspot.com/-CqSOQi4jM1A/T59mPnth2SI/AAAAAAAABvo/Y4ZSlLqmpGo/s1600/RCC3uHlbehTUeo16v2F8PxcY5UjE%253D.gif" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/23090921_mc8GPP#!i=1915146550&k=btBDPfN&lb=1&s=A" title="Photo & Video Sharing by SmugMug"><img alt="Photo & Video Sharing by SmugMug" height="358" src="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-btBDPfN/0/L/00004-L.jpg" title="Photo & Video Sharing by SmugMug" width="640" /></a></div><br />
<br />
起跑後就是一段長約兩公里的下波,根據以往經驗,我的上坡速度實在比走路快不了多少,因次這段下坡就稍微的提高速度,速度大約4.5~5m/K左右,希望能先存一點時間給待會的上坡路段用。<br />
<br />
下坡結束,經過烏來觀光大橋與烏來立體停車場後,就轉往孝義產業道路,也開始一連串的緩上坡,這段路盡力不要當步兵的意志支撐下,大約維持7m/K的速度,只可惜大約跑了4公里以後,經過這次路線的最高點孝義派出所檢查哨時腿力不支加上水站的誘人攻勢,使得這一公里跑了八分鐘。經過派出所,再往前跑一段大約一公里多一點的下坡路段就原路折返。<br />
這邊開始除了剛折返的一公里多上坡,沿路回到烏來停車場就都是換成緩下坡了,一樣稍微提高速度,用5~6m/K的速度繼續儲存一點時間給上坡路段花用。<br />
<br />
跑回停車場、經過烏來觀光大橋後,就是天堂路般的2K陡坡。<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-9kjewxrntkY/T59mkgQB2pI/AAAAAAAAByw/ZRKopNS4tEs/s1600/nbV46FuKbVGwf3zLbXeVIWYR5ZA%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-9kjewxrntkY/T59mkgQB2pI/AAAAAAAAByw/ZRKopNS4tEs/s1600/nbV46FuKbVGwf3zLbXeVIWYR5ZA%253D.gif" /></a></div>照例遇到上坡就軟腳的我,開始了跑走走跑走的階段,在走多於跑的情況下,這兩公里大約都是9m/K的慢速。終於在終點前500公尺看到許多相機跟終點線的刺激下,拼了命的跑了起來。也剛好拍到了認真跑的作假照片。<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-WNU0r-BEemQ/T59mVnrhg5I/AAAAAAAABwg/r7nZ9P1FGME/s1600/UYIshbj522FKlKPjIBcG6xMcxenA%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-WNU0r-BEemQ/T59mVnrhg5I/AAAAAAAABwg/r7nZ9P1FGME/s1600/UYIshbj522FKlKPjIBcG6xMcxenA%253D.gif" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-4s6zg4g/0/L/IMG0036-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-4s6zg4g/0/L/IMG0036-L.jpg" width="423" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-c2QsjRZ/0/L/2012061707400607-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Mimi/2012/20120617-ToughRunner/i-c2QsjRZ/0/L/2012061707400607-L.jpg" width="640" /></a></div><br />
<br />
回到終點時間是1:37:30左右,名次是462名,出乎原本預料的兩個半小時。比上次Salomon快的原因,主要差別應該就在少了山徑陡坡攻擊跟山徑塞車問題。<br />
<br />
總結而言這次路線除了最後的兩公里上坡比較沒有遮蔭,所以有日曬攻擊以外,孝義產業道路段真的跑起來蠻舒服的,有坡度但是不到恐怖陡坡的程度,沿路又很舒服不太有日曬問題。改天有機會可以在這邊好好練練山路跑,不過產業道路狹窄產生的人車爭道問題也是要考慮進去的。路線雖好,不過賽事單位還是有美中不足的地方:沿路只有水,沒有其他補給品!也沒有使用晶片計時,比起其他類似賽事,真不知道這樣的報名費是不是真的都用來買賽事紀念品了。(T-Shirt,防水背包,頭巾完跑禮)<br />
<br />
ps. 這次跑步的gps紀錄在此<a href="http://www.endomondo.com/workouts/lUtF2Y11wyA" target="_blank">Endomond Running Workout</a>,平均速度大約6.5m/K。Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-63100309212951807682012-05-28T17:04:00.000+08:002012-05-28T17:02:45.645+08:00Salomon X-Trail Run 路線與心得<br />
Route 2012 Salomon X-Trail Run Taiwan <br />
Here comes the route map.<br />
Powerd by <a href="http://www.runmap.net/">Runmap</a><br />
<br />
<a name='more'></a><br />
<br />
<br />
<b><span style="font-size: large;">Route 2012 Salomon X-Trail Run Taiwan 9K</span></b><br />
<br />
<div style="background-color: white; border: 2px solid #ee5500; color: #535353; font-family: Arial,Helvetica,sans-serif; font-size: 9px; font-style: normal; margin-bottom: 2px; margin-top: 2px; padding-bottom: 3px !important; padding: 0px; text-align: right; width: 640px;">
<iframe border="0" frameborder="0" height="610" marginheight="0" marginwidth="0" scrolling="no" src="http://www.runmap.net/route/1481326/widget?width=640&height=480&extended=true&maptype=terrain&unit=km&redirect=no&distance_markers=always" width="640"></iframe><br />
Running route <a href="http://www.runmap.net/route/1481326" style="color: #ee5500; text-decoration: underline;">1481326</a> - powered by <a href="http://www.runmap.net/" style="color: #ee5500; text-decoration: underline;">Runmap</a> </div>
<br />
<br />
<br />
<br />
<span style="font-size: large;"><b>Route 2012 Salomon X Trail Run Taiwan 17K</b></span><br />
<br />
<div style="background-color: white; border: 2px solid #ee5500; color: #535353; font-family: Arial,Helvetica,sans-serif; font-size: 9px; font-style: normal; margin-bottom: 2px; margin-top: 2px; padding-bottom: 3px !important; padding: 0px; text-align: right; width: 640px;">
<iframe border="0" frameborder="0" height="615" marginheight="0" marginwidth="0" scrolling="no" src="http://www.runmap.net/route/1465963/widget?width=640&height=480&extended=true&maptype=terrain&unit=km&redirect=no&distance_markers=always" width="640"></iframe><br />
Running route <a href="http://www.runmap.net/route/1465963" style="color: #ee5500; text-decoration: underline;">1465963</a> - powered by <a href="http://www.runmap.net/" style="color: #ee5500; text-decoration: underline;">Runmap</a> </div>
<br />
<br />
衝動+手滑+水壺腰包的影響下,報名了這個越野路跑17K。<br />
當天一大早四點半就出門趕赴五點前到中正廟搭乘接駁車,中正廟口排了長長的人龍,等待核對證件上車,大約拖到五點半才發車前往坪林。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-mHspjQT/0/L/IMAG0418-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="359" src="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-mHspjQT/0/L/IMAG0418-L.jpg" width="640" /></a></div>
<br />
到了坪林金瓜寮溪畔的會場,四五年前來過這邊烤肉戲水,這次再來卻是要來挑戰嚴苛的越野跑<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://4.bp.blogspot.com/-9kjewxrntkY/T59mkgQB2pI/AAAAAAAAByw/ZRKopNS4tEs/s1600/nbV46FuKbVGwf3zLbXeVIWYR5ZA%253D.gif" /></div>
<br />
大約六點半到現場,但是比賽7:50才開始,所以有時間慢慢換鞋子、寄物,順便排隊體驗神奇鞋墊。然後慢慢混混混到起跑線前等待出發。<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-Ffjc7gj/0/L/SalomonAll-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="352" src="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-Ffjc7gj/0/L/SalomonAll-L.jpg" width="640" /></a></div>
<br />
比賽路線可以分成三段,第一段(A->E)約6K是柏油路面,緩坡。第二段(E->F->E)就是九芎根登山步道,約4K的山路,泥土路面,陡上陡下,還有好幾個假山頭,其中還有許多地方需要拉繩協助上下。<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://2.bp.blogspot.com/-vG3_fbrPbnc/T59mnkiQOyI/AAAAAAAABzg/wE_NXatXNFQ/s1600/qPIL52XdPuS74EtK0HXPReyuJIg%253D.gif" /></div>
<br />
第三段出了登山步道以後,回到柏油路面(E->D),就接入兩段蕨類步道(D->C->B),雖然少了艷陽的加溫,但是卻有偶爾出現的階梯地獄試煉,剛經歷過陡上陡下的折磨,看到階梯地獄,真的有腳軟的fu .......<br />
<br />
在斜坡+陡坡+樓梯+烈日的連續攻擊下,最後拖著沉重的腳步,以3:02:39完賽,比預估的2.5Hr,慢了不少,也沒能保三。傷當殘念.......<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-xd5bTdM/0/L/IMG4459-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-xd5bTdM/0/L/IMG4459-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-JBBbdm2/0/L/IMGWeSport10594491-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="421" src="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-JBBbdm2/0/L/IMGWeSport10594491-L.jpg" width="640" /></a></div>
<br />
<br />
整體來說,越野跑是個蠻好玩的比賽,雖然真的有累到。但是這次比賽的補給品,可能因為人數不多,算是相當充裕,賽後還有西瓜跟冰涼仙草糖水可以喝,灌了不少杯才去撘接駁車回台北。下次如果還有類似的比賽,應該會想要再參加,但是要先把體力練好,不然又要一直爆掉,一直當步兵了。<br />
<br />
還有,完賽獎牌有點像是X-Man的獎牌,沉甸甸的,還蠻爽的。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-fFk3GNM/0/L/IMG1004-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-fFk3GNM/0/L/IMG1004-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-ZwwRsmp/0/L/IMAG0431-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="361" src="http://photo.jake.idv.tw/Mimi/2012/20120526-SalomonTrailRun/i-ZwwRsmp/0/L/IMAG0431-L.jpg" width="640" /></a></div>
<br />
<br />
ps. 這次跑步的gps紀錄在此 <a href="http://www.endomondo.com/workouts/ohfJTI69CQk" target="_blank">Endomond Running Workout</a>,山路段時間一整個慘,其中還有將近半小時才走1K的部分。Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com1tag:blogger.com,1999:blog-658947996677319057.post-41637484933201839462012-05-01T15:14:00.000+08:002012-05-01T15:14:21.705+08:00LongDong Rock Climbing Guide Book眾所期待的龍洞攀岩導覽手冊,終於在2012/04/14於和美國小前,舉辦了盛大的新書發表會。<br />
很可惜當天沒有跟到,沒能參與這麼好玩的活動。<br />
所以一直想再找機會來去買一本來收藏.....<br />
<br />
<br />
<a name='more'></a><br /><br />
不過....這個世界真是很小,我竟然也拿到了一本Matt親簽的Guide Book,還有貼紙。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-LongDongGuidebook/i-J82L43d/0/L/IMG4736-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-LongDongGuidebook/i-J82L43d/0/L/IMG4736-L.jpg" width="423" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-LongDongGuidebook/i-kPBp4zt/0/L/IMG4738-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-LongDongGuidebook/i-kPBp4zt/0/L/IMG4738-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-LongDongGuidebook/i-mmCM8hd/0/L/IMG4742-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-LongDongGuidebook/i-mmCM8hd/0/L/IMG4742-L.jpg" width="640" /></a></div>
<br />
<br />
呵呵~真是太奇妙了。原來我弟因為工作的關係,在新書出版後,可能因為某些業務的關係,Matt去了一趟他們公司,所以他就請Matt幫我簽了一本書。就這樣,我也有了Matt親簽的Guide Book囉。<br />
<br />Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-5082936779955983542012-05-01T14:31:00.000+08:002012-05-01T14:38:52.204+08:00Mountain Hardware LightWedge 3CampSaver的團購,除了一些攀岩用品,<br />
另外的高單價主要項目,就是Mountain Hardware LightWedge3這頂帳棚了。<br />
<br />
<br />
<a name='more'></a><br />
<br />
先來看看官網的介紹<br />
<a href="http://www.mountainhardwear.com/LightWedge%E2%84%A2-3/OU9605,default,pd.html" target="_blank">Mountain Hardware LightWedge3</a><br />
<br />
官網照:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-MhpM8Cj/0/L/IMG4782-L.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br />
<img border="0" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-MhpM8Cj/0/L/IMG4782-L.jpg" width="300" /></a></div>
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-hh47TNs/0/L/IMG4781-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br />
<img border="0" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-hh47TNs/0/L/IMG4781-L.jpg" width="300" /></a><br />
<br />
<br />
主要特性:<br />
防雨(Rain room tested with 1200" of rain in 24 hours.)<br />
短營柱撐開前庭(Large dry entry vestibule with a strong aluminum brow pole provides ample head room.)<br />
可搭快速帳(Pitch Light™ configuration allows user to set up a superlight shelter using only the tent fly, poles and footprint.)<br />
<br />
規格:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-7kmVjWq/0/L/IMG4783-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-7kmVjWq/0/L/IMG4783-L.jpg" width="601" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-686TJhR/0/L/IMG4780-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="521" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-686TJhR/0/L/IMG4780-L.jpg" width="640" /></a></div>
<br />
<br />
搭設方式:一般<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-CdVrnTL/0/L/IMG4784-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="329" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-CdVrnTL/0/L/IMG4784-L.jpg" width="640" /></a></div>
<br />
搭設方式:快速帳<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-BT8gzJ6/0/L/IMG4785-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="329" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-BT8gzJ6/0/L/IMG4785-L.jpg" width="640" /></a></div>
<br />
<br />
介紹完畢,那就來看看實際開箱作業情況吧<br />
首先是驗明正身的吊牌<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-4Mrhhh7/0/L/IMG4701-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-4Mrhhh7/0/L/IMG4701-L.jpg" width="423" /></a></div>
由左到右分別是:內帳、外帳、營柱、營釘<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-fh92S9X/0/L/IMG4702-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-fh92S9X/0/L/IMG4702-L.jpg" width="640" /></a></div>
<br />
營釘九根,重量136.5g,搭設方式說明中,只有使用到八根,多一根應該是預備用<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-JJcqqCx/0/L/IMG4707-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-JJcqqCx/0/L/IMG4707-L.jpg" width="640" /></a></div>
<br />
營柱兩根,每根重達287g<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-XP6fCkp/0/L/IMG4708-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-XP6fCkp/0/L/IMG4708-L.jpg" width="423" /></a></div>
<br />
前庭短營柱,重64g<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-qCPGZZT/0/L/IMG4710-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-qCPGZZT/0/L/IMG4710-L.jpg" width="423" /></a></div>
<br />
內帳攤開<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-52zH3SL/0/L/IMG4715-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-52zH3SL/0/L/IMG4715-L.jpg" width="423" /></a></div>
<br />
比例尺,三人帳塞兩人應該很舒適了<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-tXMmRJ8/0/L/IMG4716-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-tXMmRJ8/0/L/IMG4716-L.jpg" width="640" /></a></div>
<br />
<br />
架上營柱,內部高度也很夠,坐著的時候,頭頂還有很多空間<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-RjCGcvm/0/L/IMG4723-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-RjCGcvm/0/L/IMG4723-L.jpg" width="423" /></a></div>
<br />
<br />
內帳架好的樣子<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-hpX7ttN/0/L/IMG4726-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-hpX7ttN/0/L/IMG4726-L.jpg" width="423" /></a></div>
<br />
<br />
蓋上外帳<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-FSsHjKF/0/L/IMG4731-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-MHW-LightWedge3/i-FSsHjKF/0/L/IMG4731-L.jpg" width="640" /></a></div>
<br />
<br />
<br />
從米國空運進來,加上手續費、關稅,總共55xx大洋,算是相當物美價廉的選項了。<br />
試搭之後,還蠻滿意的,可以很快速的搭好,許多扣具、拉鍊也都有便民的設計,可以輕鬆快速搭起帳棚。內部空間也很大,該有的置物網袋也都有,而且還很多個。<br />
不過重量接近三公斤,就等實際上山來試試看腳力了。<br />
另外,輕量化的內帳網布設計,雖然網布的範圍比之前睡的Ferrino Chao 2高一點,看起來可以避免一些被冷風吹頭的疑慮,不過實際使用情況也是要等山上才見真章。<br />
所以,接下來就是找一個輕鬆的兩天一夜中級山,上山去混一混囉。<br />
<br />
<br />
PS. 官網的專用地布要60鎂,我看還是黑色大塑膠袋粘一粘拼接起來,或是買台製地布擋著先好了Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-79530064769836469682012-05-01T12:11:00.001+08:002012-05-01T16:21:46.987+08:00兩雙新岩鞋+BD ATC先是跟了一團大陸LaSportiva買岩鞋,後來又開了一團CampSaver買了一堆東西。<br />
先來看看岩鞋跟BD ATC的部分<br />
<br />
<br />
<a name='more'></a><br />
<br />
La Sportiva Tora Climbing Shoe<br />
對岸淘寶團購價大約1.8K,很亮的紅色鞋身。<br />
據說是最後一雙9.5號了,穿上去還好不是很痛,<br />
但是腳趾還是有緊實的感覺,不像Mammut的空虛腳趾。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-9cFpVs9/0/L/IMG4664-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-9cFpVs9/0/L/IMG4664-L.jpg" width="640" /></a></div>
<br />
側身來一張<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-hTrdnKk/0/L/IMG4666-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-hTrdnKk/0/L/IMG4666-L.jpg" width="640" /></a></div>
<br />
繼上次的 Mammut 特價出清,再度入手名牌(低價)岩鞋,<br />
希望可以比之前團購的對岸MadRock穿更久 <a href="http://4.bp.blogspot.com/-WNU0r-BEemQ/T59mVnrhg5I/AAAAAAAABwg/r7nZ9P1FGME/s1600/UYIshbj522FKlKPjIBcG6xMcxenA%253D.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://4.bp.blogspot.com/-WNU0r-BEemQ/T59mVnrhg5I/AAAAAAAABwg/r7nZ9P1FGME/s1600/UYIshbj522FKlKPjIBcG6xMcxenA%253D.gif" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-9p3zSq6/0/L/IMG4673-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-9p3zSq6/0/L/IMG4673-L.jpg" width="640" /></a></div>
<br />
<br />
然後,前陣子CampSaver有出清特價,然後又開放運到台灣,所以就開了一團CampSaver敗家。<br />
總共買了MHW LightWedge3 + BD ATC + Evolv Pontas Climbing Shoe。<br />
MHW LightWedge3<a href="http://blog.jake.idv.tw/2012/05/mountain-hardware-lightwedge-3.html" target="_blank">開箱文在此</a>。<br />
這邊先來看看 BD ATC 跟 Evolv Pontas Climbing Shoe<br />
<br />
很簡單的ATC,大家都很熟,所以也沒啥好介紹的。<br />
買下來攤一攤手續費、關稅,大約4xx,相對於本地價6xx,算是便宜一點點。<br />
因為舊的ATC已經有點點磨損出現,也用了兩三年,安全起見,也該換了。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-qSv9zmt/0/L/IMG4680-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-qSv9zmt/0/L/IMG4680-L.jpg" width="640" /></a></div>
<br />
然後是 Evolv Pontas Climbing Shoe,據說Chris Sharma有參與設計?<br />
不知道穿上去以後可不可以有他百分之一的功力 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-L66vKMw/0/L/IMG4681-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-L66vKMw/0/L/IMG4681-L.jpg" width="263" /></a><a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-xvZLR9F/0/L/IMG4682-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-xvZLR9F/0/L/IMG4682-L.jpg" width="264" /></a></div>
<br />
開箱囉~~<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-nLCJ8WT/0/L/IMG4684-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-nLCJ8WT/0/L/IMG4684-L.jpg" width="423" /></a></div>
拿出來驗明正身<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-qJmWz5d/0/L/IMG4686-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-qJmWz5d/0/L/IMG4686-L.jpg" width="640" /></a></div>
<br />
官方規格: <a href="http://www.evolvsports.com/shop/closeout/pontas-sharma-series/">http://www.evolvsports.com/shop/closeout/pontas-sharma-series/</a><br />
<span style="background-color: #999999;"><span style="font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> PROFILE: Asymmetrical toe profile (KA-1 last)</span><span style="font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> </span></span><br />
<span style="background-color: #999999; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> SOLE: 4.2mm TRAX® XT-5 high friction rubber </span><br />
<span style="background-color: #999999; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> RAND: 2.2mm TRAX® duro-rand </span><br />
<span style="background-color: #999999; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> UPPER: Non-stretch Synthratek synthetic upper </span><br />
<span style="background-color: #999999; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> LINING: Cotton fiber lining </span><br />
<span style="background-color: #999999;"><span style="font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> MIDSOLE: MX-S 1.5mm 3/4 length semi-stiff</span><span style="font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22px; text-align: left;"> </span></span><br />
鞋底特寫<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-WM42RN8/0/L/IMG4689-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-WM42RN8/0/L/IMG4689-L.jpg" width="640" /></a></div>
<br />
大頭<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-NvqbVCt/0/L/IMG4691-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-NvqbVCt/0/L/IMG4691-L.jpg" width="423" /></a></div>
<br />
大屁股<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-2vPdzCN/0/L/IMG4697-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/OpenBox/20120430-CampSaverShopping/i-2vPdzCN/0/L/IMG4697-L.jpg" width="423" /></a></div>
<br />
<br />
算一算目前總共穿過6雙鞋<br />
<a href="https://picasaweb.google.com/lh/photo/WsBAM4dAhLaYCImmC2BZDtZh47MK9vz1oK3E-eQSEtw?feat=directlink" target="_blank">Five.Ten - Coyote VCS</a> (補過鞋底,太大,少穿)<br />
登山友零碼出清不知名品牌 (壞掉,已丟棄)<br />
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20100430-%E6%94%80%E5%B2%A9%E8%A3%9D%E5%82%99/15049989_ZLNzST" target="_blank">Mad Rock Demon Climbing Shoes</a> (鞋底破)<br />
<a href="http://photo.jake.idv.tw/Galleries/OpenBox/20110614-Mammut/17716637_QzQHdT" target="_blank">Mammut Tusk Slipper</a> (現役)<br />
LaSportiva Tora<br />
Evolv Pontas<br />
以目前存貨來看跟攀岩頻率來看,應該夠我穿一陣子了<br />
<br />Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-27625850431535301572012-02-24T09:42:00.000+08:002012-02-24T09:44:38.228+08:00[轉]商業周刊-專欄部落格-科技報橘-五招圖解 Google 搜尋密技 (1/1)<a href="http://www.businessweekly.com.tw/blog/article.php?id=1029">商業周刊-專欄部落格-科技報橘-五招圖解 Google 搜尋密技 (1/1)</a>:<br />
<br />
<br />
<a name='more'></a><br />
<br />
文章備份:<br />
<br />
<div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
江湖上有這麼一說:欲練神功,必先谷歌</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
而你是否每次在Google時都只加入空白鍵分隔關鍵字呢?</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
最近伊利諾<a href="http://www.insidehighered.com/news/2011/08/22/erial_study_of_student_research_habits_at_illinois_university_libraries_reveals_alarmingly_poor_information_literacy_and_skills" muse_scanned="true" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #1e5780; font-size: 16px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">Wesleyan 大學的研究</a>發現只有不到25%的學生擁有理想的搜尋技能,而大部份的學生對於搜尋過程上都有相當程度的困難與阻礙。相對於資訊同樣發達的台灣學生與研究生,可是相當大的警訊,如何有效率的搜尋可是攸關報告和論文能否準時交差呀。<br />
透過以下的圖解搜尋小技巧,希望讓大家在尋找資訊時更為順利又迅速。</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<strong style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">第一招─小試身手</strong></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<img alt="" height="1426" src="https://lh6.googleusercontent.com/d3OltwNQ46IeB3q3JX-Wj5iwihE7VCsyBO6Hy5qxjLC0KufsGNU4lgN1txVGwPWfCiaHKKSObjcjQvhAfJLLPZYoK2PImavcy2IIvRt9uuGFbt_6wgE" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" width="640" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
想搜尋紐約時報在2008到2010年關於大學測試分數但不是SAT入學分數的文章?</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
Step1:若只想搜尋NYTIMES網站的資料,輸入site:nytimes.com<br />
Step2:關鍵字前面加上波浪符號,輸入~college<br />
Step3:將不可拆開的關鍵字用雙引號括起來,輸入”test scores”<br />
Step4:不想納入的關鍵字前面加上負號,輸入-SATs<br />
Step5:時間區間用兩個句點間隔,輸入2008..2010</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
想搜尋燕子飛行速度的專業報告?</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
Step1:若只想搜尋PDF檔案,輸入filetype:pdf<br />
Step2:若只想搜尋文章的「標題」,例如:速度(velocity),關鍵字請輸入intitle:velocity<br />
Step3:搜尋各式各樣的燕子(swallow),在燕子前加上*,輸入*swallow</div>
<h4 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
第二招─研究生必殺技</h4>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<img alt="" height="866" src="https://lh4.googleusercontent.com/rvEfJds41zlihw7fSmtFDvYHuBf6HHXoYILupnDtUp-TGFXPWA0luJYJ2tO84ZMJfEb13ZqtrvCPcOTo5HMC7KTusleyISdJk7LH4N0dJtwo45e2HkI" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" width="640" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
想搜尋Dr. Ronald L. Green和Dr. Thomas P.Buttz關於光合作用(photosynthesis)的論文?</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
Step1:作者關鍵字,輸入author:green<br />
Step2:主題關鍵字,輸入potosynthesis<br />
Step3:想讓搜尋結果更明確,在關鍵字旁加入雙引號,在此加入作者的全名簡寫,輸入”tp buttz”</div>
<h4 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
第三招─移行換單位</h4>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<img alt="" height="901" src="https://lh3.googleusercontent.com/moVNy-IsDHqOPFEXRjDhgZJEoXpZ4z2pedO1zTDFrNlSdFqzkg_4Oa-YymVBLQNiPud2mg5SJTcap07Qrj-3ND_l3lBvHu-JYkEAakTv-AsyjgRQw5c" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" width="640" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
字詞定義<br />
想找某個詞的定義,可以在關鍵字前輸入define:<br />
例如:define:angary</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
數學計算<br />
直接輸入數學運算式即可<br />
例如:(2*3)/5+44-1</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
單位轉換<br />
在想轉換的單位前加上in<br />
例如:54 pounds in kilograms,中文也可:54磅in公斤</div>
<h4 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
第四招─殺手鍵</h4>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<img alt="" height="1600" src="https://lh3.googleusercontent.com/XIXsXySadHMrsxg9DXbAz1ltm0aaOzFcMbdwX_M5wGd800d8zmHPh_QNwZn-SsaUtkQugKw-7wkm6Y1igYgT613zlncJLXGR0DxR0q1uK9lcQm6XKto" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" width="543" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
在這裡一般鍵盤上為Ctrl 鍵,Apple的使用者則是用Command鍵(空白鍵旁邊的那顆):</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
在頁面上做關鍵字搜尋<br />
只要同時按下Ctrl加上F,再輸入關鍵字,關鍵字就會被重點標注</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
頁面上放大縮小<br />
同時按下Ctrl加上+或-,即可放大或縮小頁面和PDF檔的文件</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
選取頁面網址<br />
同時按下Ctrl加上L,就可以直接切換到網址列並選取網址</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
分頁循環<br />
Ctrl加上tab鍵,可以切換到瀏覽器下一個分頁</div>
<h4 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
第五招─萬宗歸一心法</h4>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<img alt="" height="1257" src="https://lh3.googleusercontent.com/CqCdCo9pPtX0T138iSAA7lTeoTNLGwYIYx9_KRC89rLBUx5qByBAvRGD3fSb-YKiparS7JlmGSyd5xOqcdEFkPG0URrEFL68X-FWBXarktKSfLzl1Jg" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" width="640" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
善用你的圖書館資料庫<br />
Google也許是十分好用的工具,但也別忘了許多重要的文獻還是需要從專業的論文資料庫搜尋才找的到喔!</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
別引用維基百科<br />
維基百科給我們相當大的方便做資料搜集,是一個很適合入門的地方,但裡面很多資料已經是缺乏來源引證的,但好的維基條目還是可以提供我們一些引用資料的線索。</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
找參考文獻<br />
在數位或傳統的研究上,從書、論文或報告上的參考文獻下手是不會錯的,從文獻追溯,有機會找到更具重要性的資料。<br />
即使Google如此方便,大家還是要動動腦、重新消化一番呀。可不要複製貼上大法,到時老闆也用五招密技找到一樣的資料,被抓包可就得不償失了。</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #484848; font-family: Verdana, Arial, Helvetica, sans-serif; font: inherit; line-height: 30px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
(資料來源:<a href="http://mashable.com/2011/11/24/google-search-infographic/" muse_scanned="true" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #1e5780; font-size: 16px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">mashable</a>)</div>
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-90936368702236379192012-01-05T17:30:00.000+08:002012-01-05T17:32:51.326+08:00[轉]跑步時的熱量消耗<br />
[轉自]<br />
<a href="http://blog.yam.com/coolmarkfat/article/37323935">我們的健康減肥日誌 - 酷馬克: 跑步時的熱量消耗 - yam天空部落</a>:<br />
<br />
<br />
<a name='more'></a><br /><br />
原文:<br />
<span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">通常可以用下列公式粗略的計算跑步時的熱量消耗: </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">(1)已知體重,時間和速度 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">跑步熱量(千卡)=體重(公斤)×運動時間(小時)×指數 K表 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">指數 K表= 30 ÷速度(分鐘 / 400米) </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">例如:某人體重 60公斤,長跑 1小時,速度是3分鐘 / 400米或8公里/小時,那麼他跑步過程中消耗的熱量 = 60 × 1 × 30 / 3 = 600kcal(千卡) </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">此種計算含蓋了運動後由於基礎代謝率提高所消耗的一部分熱量,也就是運動後體溫升高所產生的一部分熱量。 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">(2)已知體重,距離 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">跑步熱量(千卡)=體重(公斤)×距離(公里)× 1.036 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">例如:體重 60公斤的人,長跑 8公里,那麼消耗的熱量 = 60 × 8 × 1.036 = 497.28千卡(千卡) </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">(3)已知體重,速度和時間 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">跑步熱量(千卡)=體重(公斤)×運動時間(分鐘)×指數 K表 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">一小時 8公里K表= 0.1355 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">一小時 12公里K表= 0.1797 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">一小時 15公里K表= 0.1875 </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">體重 60公斤的人,長跑 1小時,速度為 8公里/小時,那麼消耗的熱量 = 60 × 60 × 0.1355 = 487.8kcal(千卡) </span><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><br style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;" /><span style="background-color: white; color: #999999; font-family: Arial; font-size: 12px; line-height: 22px; text-align: left;">需要指出的是以上公式都很粗略,因為它們忽視了年齡,性別,體質和基礎代謝率等因素,只是給大家提供一個參考。</span>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-17179227530883216422011-12-20T10:14:00.000+08:002011-12-20T10:18:44.395+08:00牛逼洋行餓店 - Eating List<a href="http://www.wretch.cc/blog/rechial36/12712893">台中…吃不完的巨無霸~(牛逼洋行餓店) - 許多夢想等待著去實現~小熊君 - 無名小站</a>:<br />
<br />
<a href="http://nicole0726.pixnet.net/blog/post/28788929-%E3%80%90%E5%8F%B0%E4%B8%AD%E5%B8%82-%E9%A3%9F%E3%80%91%E5%A5%BD%E5%90%83%E7%9A%84%E8%B6%85%E7%B4%9A%E5%A4%A7%E6%BC%A2%E5%A0%A1--%E7%89%9B%E9%80%BC%E9%A4%93%E5%BA%97">【台中市-食】好吃的超級大漢堡--牛逼餓店@ 喵喵‧享受輕生活</a><br />
<div>
<br /></div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-68195351781436842952011-11-09T17:16:00.003+08:002011-11-09T17:16:54.449+08:00Southern France Day09<div style="text-align: center;">
第九天</div>
<div style="text-align: center;">
巴黎-->曼谷機場-->台北</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
第九天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/19850421_wMLL3W" target="_blank">20111002 Frence Day09</a><br />
<br />
今天要收拾書包回家去了,因為時差的關係,所以第九天就啟程回家。<br />
<br />
法國 CDG 戴高樂機場 亂亂拍<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-KXMC7Ms/0/L/IMG7825-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-KXMC7Ms/0/L/IMG7825-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-frQ36S3/0/L/IMG7846-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-frQ36S3/0/L/IMG7846-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-ksGSdHm/0/L/IMG7871-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-ksGSdHm/0/L/IMG7871-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
在飛機上一樣好吃好睡的,一覺醒來就到曼谷了,</div>
<div class="separator" style="clear: both; text-align: center;">
再過三小時的飛行,就要回到台灣了</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-JbZBsf8/0/L/IMG7911-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111002-Frence-Day09/i-JbZBsf8/0/L/IMG7911-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
<div style="text-align: center;">
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-86589478095463679262011-11-09T17:07:00.004+08:002011-11-09T17:08:50.524+08:00Southern France Day08<div style="text-align: center;">
第八天</div>
<div style="text-align: center;">
La Défense -->Arc de Triomphe 凱旋門-->Opera Garnier 巴黎歌劇院<br />
-->Les Galeries Lafayette 拉法葉百貨-->Château de Versailles 凡爾賽宮</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
第八天的旅遊地圖如下:<br />
<a href="http://maps.google.com.tw/maps/ms?msid=200243770484793006040.0004aee1162710dbee6cd&msa=0&ll=48.851388,2.25872&spn=0.187732,0.445976" target="_blank">Google Maps</a><br />
第八天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/19849066_BT85Gh" target="_blank">20111001 Frence Day08</a><br />
<br />
<br />
導遊說早上的凱旋門比較漂亮,所以就帶我們到安全島上面去拍照了 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-nfg2BsL/0/L/IMG7305-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-nfg2BsL/0/L/IMG7305-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-k4PTvF6/0/L/IMG7338-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-k4PTvF6/0/L/IMG7338-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
巴黎歌劇院,早上休息中,沒什麼人,到了下午就有一堆人在廣場前,</div>
<div class="separator" style="clear: both; text-align: center;">
可能是等著看表演,或是散步休息</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-8gNPgFq/0/L/IMG7381-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-8gNPgFq/0/L/IMG7381-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-td3KD4H/0/L/IMG7384-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-td3KD4H/0/L/IMG7384-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-TL7LGS7/0/L/IMG7409-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-TL7LGS7/0/L/IMG7409-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-thtDGh6/0/L/IMG7411-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-thtDGh6/0/L/IMG7411-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-MqSRR9J/0/L/IMG7414-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-MqSRR9J/0/L/IMG7414-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
在歌劇院外晃了一圈,就到了團員們最期待的Shopping時間了,</div>
<div class="separator" style="clear: both; text-align: center;">
一夥人在導遊的帶領下,殺入Les Galeries Lafayette 拉法葉百貨,</div>
<div class="separator" style="clear: both; text-align: center;">
連午餐都可以放棄不吃,果然消費力驚人阿</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-pdkfZQn/0/L/IMG7495-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-pdkfZQn/0/L/IMG7495-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-Qkdvbkb/0/L/IMG7489-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-Qkdvbkb/0/L/IMG7489-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-PHmj5r9/0/L/IMG7482-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-PHmj5r9/0/L/IMG7482-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
這是我們的午餐:巴黎名店 Pierre Herme 的 Macarons</div>
<div class="separator" style="clear: both; text-align: center;">
真的好吃,也沒有想像中的貴,但是小小一個也要兩三歐</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-sGMDV5M/0/L/IMG7505-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-sGMDV5M/0/L/IMG7505-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
掃完貨,辦完退稅,滿身銅臭味,就該去有藝術氣息的地方陶冶一下心情。</div>
<div class="separator" style="clear: both; text-align: center;">
所以一行人帶著滿滿的名牌包,來到了Château de Versailles 凡爾賽宮</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-dvbT6Fh/0/L/IMG7533-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-dvbT6Fh/0/L/IMG7533-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-GFPCMMf/0/L/IMG7552-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-GFPCMMf/0/L/IMG7552-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3c95xmJ/0/L/IMG7677-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3c95xmJ/0/L/IMG7677-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-Scvj7KN/0/L/IMG7700-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-Scvj7KN/0/L/IMG7700-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-cvTdmg4/0/L/IMG7571-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-cvTdmg4/0/L/IMG7571-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
專業國語導遊帶我們參觀凡爾賽宮,講解的很詳細,只可惜時間太短,</div>
<div class="separator" style="clear: both; text-align: center;">
跟羅浮宮一樣,都只能看重點</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
超大的天頂濕壁畫</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-dWGwbvv/0/L/IMG761642-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-dWGwbvv/0/L/IMG761642-L.jpg" width="637" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
金碧輝煌</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3QCxBn2/0/L/IMG7581-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3QCxBn2/0/L/IMG7581-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-gbvVjwK/0/L/IMG7583-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-gbvVjwK/0/L/IMG7583-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
這是平面畫,看起來超級立體的</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3PJ9N52/0/L/IMG7673-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3PJ9N52/0/L/IMG7673-L.jpg" width="400" /></a><a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-wHkgzhV/0/L/IMG7730-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-wHkgzhV/0/L/IMG7730-L.jpg" width="400" /></a></div>
<div class="" style="clear: both; text-align: center;">
路易十四</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-NJbQbft/0/L/IMG7660-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-NJbQbft/0/L/IMG7660-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
拿破崙加冕圖,跟羅浮宮同一個畫家所作,但是有些微的不同</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-C2HWVQ7/0/L/IMG7722-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-C2HWVQ7/0/L/IMG7722-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
經過充實的心靈饗宴,也該開始肚皮饗宴了。</div>
<div class="separator" style="clear: both; text-align: center;">
所以今天晚餐是很豐盛的海鮮大餐。</div>
<div class="separator" style="clear: both; text-align: center;">
喔,說錯了,海鮮是前菜的前菜而已。</div>
<div class="separator" style="clear: both; text-align: center;">
有螃蟹、生蠔、田螺</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-sWcPmXh/0/L/IMG7756-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-sWcPmXh/0/L/IMG7756-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-4xLTc3c/0/L/IMG7762-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-4xLTc3c/0/L/IMG7762-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
真的前菜來了:鵝肝沙拉+烤田螺</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-J7Zvkmf/0/L/IMG7766-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-J7Zvkmf/0/L/IMG7766-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3Mz785p/0/L/IMG7763-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-3Mz785p/0/L/IMG7763-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
主菜 柑橘鴨腿</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-KFJj4r7/0/L/IMG7768-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-KFJj4r7/0/L/IMG7768-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
甜點 蘋果派</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-CrTGbR6/0/L/IMG7789-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20111001-Frence-Day08/i-CrTGbR6/0/L/IMG7789-L.jpg" width="264" /></a></div>
</div>
<div style="text-align: center;">
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-50093258487570198992011-11-09T16:28:00.002+08:002011-11-09T17:08:50.482+08:00Southern France Day07<div style="text-align: center;">
第七天</div>
<div style="text-align: center;">
Carcassonne-->Montpellier-->(TGV)-->Paris</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
第七天的旅遊地圖如下:<br />
<a href="http://maps.google.com.tw/maps/ms?msid=200243770484793006040.0004aee1152fe2e019b49&msa=0&ll=45.958788,3.054199&spn=6.346484,14.27124" target="_blank">Google Maps</a><br />
第七天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/19799894_bJ66tT" target="_blank">20110928 Frence Day07</a><br />
<br />
清晨就起床趕車趕車趕車,為了怕搭不上TGV,<br />
連早餐都是迅速解決,終於準於到站,搭上往巴黎的TGV,<br />
就這樣一路到了巴黎<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-MmrfCbN/0/L/IMG6248-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-MmrfCbN/0/L/IMG6248-L.jpg" width="264" /></a></div>
<br />
巴黎市政廳<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-WVPhxkB/0/L/IMG6322-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-WVPhxkB/0/L/IMG6322-L.jpg" width="400" /></a></div>
<br />
Cathédrale Notre-Dame de Paris 巴黎聖母院<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-pcT2GJK/0/L/IMG6338-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-pcT2GJK/0/L/IMG6338-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-gfBBw5v/0/L/IMG6341-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-gfBBw5v/0/L/IMG6341-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-ggm5WCP/0/L/IMG6357-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-ggm5WCP/0/L/IMG6357-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-zCZk2RP/0/L/IMG6416-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-zCZk2RP/0/L/IMG6416-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-kN4hN5v/0/L/IMG6378-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-kN4hN5v/0/L/IMG6378-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-R7F2Z4n/0/L/IMG6379-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-R7F2Z4n/0/L/IMG6379-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
聖母院前的PointZero,法國丈量地圖的起點</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-pVz8hWx/0/L/IMG6368-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-pVz8hWx/0/L/IMG6368-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
可惜的是鐘樓怪人住的鐘樓,排了太多人了,時間不夠沒辦法上去參觀。</div>
<div class="separator" style="clear: both; text-align: center;">
不過剩下來的時間,就跑去買了巴黎最有名的冰淇淋來喀</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-H234jvz/0/L/IMG6398-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-H234jvz/0/L/IMG6398-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-qTdQLtS/0/L/IMG6402-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-qTdQLtS/0/L/IMG6402-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
結束了聖母院,就搭巴黎的地鐵體驗一下,到了羅浮宮</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-JGZ6DnN/0/L/IMG6502-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-JGZ6DnN/0/L/IMG6502-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-5cfvX34/0/L/IMG6506-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-5cfvX34/0/L/IMG6506-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-LHspNnJ/0/L/IMG6534-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-LHspNnJ/0/L/IMG6534-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-TQx85wj/0/L/IMG6543-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-TQx85wj/0/L/IMG6543-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-hsSPFTW/0/L/IMG6612-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-hsSPFTW/0/L/IMG6612-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-c6dQmTm/0/L/IMG6658-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-c6dQmTm/0/L/IMG6658-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-3JVgF9x/0/L/IMG6666-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-3JVgF9x/0/L/IMG6666-L.jpg" width="212" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-PqHzddS/0/L/IMG6662-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-PqHzddS/0/L/IMG6662-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-wzKfxSP/0/L/IMG6682-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-wzKfxSP/0/L/IMG6682-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-dH24pbv/0/L/IMG6704-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-dH24pbv/0/L/IMG6704-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-bngrMkC/0/L/IMG6706-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-bngrMkC/0/L/IMG6706-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-KGqFf8B/0/L/IMG6736-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-KGqFf8B/0/L/IMG6736-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
走馬看花的看完了羅浮宮的重點,轉到巴黎鐵塔拍拍照</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-5PmTXnx/0/L/IMG6822-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-5PmTXnx/0/L/IMG6822-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-JsPbGzp/0/L/IMG6845-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-JsPbGzp/0/L/IMG6845-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-cPwXnwk/0/L/IMG6856-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-cPwXnwk/0/L/IMG6856-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
晚餐則是坐在遊船上吃的,在賽納河上,看的夕陽下的巴黎,</div>
<div class="separator" style="clear: both; text-align: center;">
別有一番風情</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-vRbCXDd/0/L/IMG6915-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-vRbCXDd/0/L/IMG6915-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-mG79nDS/0/L/IMG6963-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-mG79nDS/0/L/IMG6963-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
至於晚餐則是一般般的水準而已阿 XD</div>
<div class="separator" style="clear: both; text-align: center;">
普通到我連主餐牛排or鮭魚都沒拍下來阿 (逃~~~)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-H6JgNp9/0/L/IMG6992-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-H6JgNp9/0/L/IMG6992-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-npPFz3H/0/L/IMG6943-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-npPFz3H/0/L/IMG6943-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-Xzxn5qZ/0/L/IMG7082-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-Xzxn5qZ/0/L/IMG7082-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
吃完晚餐,繼續去拍夜景</div>
Musée des plans reliefs<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-9P8PNDV/0/L/IMG7169-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-9P8PNDV/0/L/IMG7169-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Tour Eiffel</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-xqN7wx6/0/L/IMG7177-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-xqN7wx6/0/L/IMG7177-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
當然照例,回到飯店以後,還是要偷跑出來逛逛</div>
<div class="separator" style="clear: both; text-align: center;">
La Défense新凱旋門</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-v4pF3Sb/0/L/IMG7219-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-v4pF3Sb/0/L/IMG7219-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-h2HWgDS/0/L/IMG7268-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-h2HWgDS/0/L/IMG7268-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-LFHp2Dt/0/L/IMG7264-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110930-Frence-Day07/i-LFHp2Dt/0/L/IMG7264-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-61312197581731603362011-11-09T10:37:00.001+08:002011-11-09T17:08:50.492+08:00Southern France Day06<div style="text-align: center;">
第六天</div>
<div style="text-align: center;">
Avignon-->Arles-->Carcassonne</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
第六天的旅遊地圖如下:<br />
<a href="http://maps.google.com.tw/maps/ms?msid=200243770484793006040.0004aee1145931b0689dd&msa=0&ll=43.592328,3.771057&spn=1.605294,3.56781" target="_blank">Google Maps</a><br />
第六天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/19797307_49zDqF" target="_blank">20110929 Frence Day06</a><br />
<br />
開到Arles近郊,先去看看梵谷的斷橋<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-PZRf7XK/0/L/IMG5581-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-PZRf7XK/0/L/IMG5581-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-WCXtGBx/0/L/IMG5586-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-WCXtGBx/0/L/IMG5586-L.jpg" width="264" /></a></div>
<br />
然後進到Arles市區的梵谷公園,有一個詭異顏色的梵谷頭像,<br />
為什麼要用藍色的呢?配上表情,這樣比較有恐怖片的fu嗎?<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-CX6N2Nj/0/L/IMG5591-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-CX6N2Nj/0/L/IMG5591-L.jpg" width="400" /></a></div>
<br />
接下來到了梵谷咖啡館,想要看原作的可以Google "梵谷 咖啡館"<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-V2MkxFP/0/L/IMG5650-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-V2MkxFP/0/L/IMG5650-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-3GMGp23/0/L/IMG5653-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-3GMGp23/0/L/IMG5653-L.jpg" width="400" /></a></div>
<br />
Arles市區也有一個競技場,不過當時正在整修,沒能進去。<br />
每年這邊也會舉辦鬥牛賽。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-mSGTnK4/0/L/IMG5693-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-mSGTnK4/0/L/IMG5693-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-ZN9h4Km/0/L/IMG5694-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-ZN9h4Km/0/L/IMG5694-L.jpg" width="400" /></a></div>
<br />
逛完Arles,又到了午餐時間,今天在戶外游泳池、大花園的餐廳吃飯<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-7rV3XS6/0/L/IMG5725-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-7rV3XS6/0/L/IMG5725-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-JMg454F/0/L/IMG5732-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-JMg454F/0/L/IMG5732-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-HLsfC68/0/L/IMG5749-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-HLsfC68/0/L/IMG5749-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-xNTL4XC/0/L/IMG5753-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-xNTL4XC/0/L/IMG5753-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
吃飽飯後,繼續拉車到Carcassonne,今天晚上準備要住古堡了 XD<br />
Carcassonne 1997年被聯合國教科組織(UNESCO)列作「世界文化遺產城市」<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-5Hkg85T/0/L/IMG5791-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-5Hkg85T/0/L/IMG5791-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
今晚的旅館</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-vn9cjXn/0/L/IMG5921-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-vn9cjXn/0/L/IMG5921-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
房間看出去的景色</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-9wmdndB/0/L/IMG5922-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-9wmdndB/0/L/IMG5922-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Carcassonne 古城的內城</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-xXtKhJC/0/L/IMG5944-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-xXtKhJC/0/L/IMG5944-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
從Carcassonne古城俯瞰市區</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-SmjpXH5/0/L/IMG599197-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="352" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-SmjpXH5/0/L/IMG599197-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Carcassonne古城</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-sMn2fnJ/0/L/IMG6026-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-sMn2fnJ/0/L/IMG6026-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-vQfhHst/0/L/IMG6058-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-vQfhHst/0/L/IMG6058-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-qnrL3X6/0/L/IMG6061-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-qnrL3X6/0/L/IMG6061-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Carcassonne 古城內的教堂</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-f5gN4ng/0/L/IMG5932-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-f5gN4ng/0/L/IMG5932-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-8GMpFZz/0/L/IMG6070-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-8GMpFZz/0/L/IMG6070-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-sDbgRkv/0/L/IMG6078-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-sDbgRkv/0/L/IMG6078-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-Sg5QkBc/0/L/IMG6079-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-Sg5QkBc/0/L/IMG6079-L.jpg" width="264" /></a></div>
<br />
逛了一圈古城,肚子也餓了,今天晚餐有<br />
雞肉生菜沙拉+肌肉小米飯佐番茄醬汁+當地傳統菜白豆燉肉+冰淇淋烤布丁甜點<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-4B9MbRh/0/L/IMG6104-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-4B9MbRh/0/L/IMG6104-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-CJkfpch/0/L/IMG6109-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-CJkfpch/0/L/IMG6109-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-DQFZ3Mc/0/L/IMG6134-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-DQFZ3Mc/0/L/IMG6134-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-zzWnrfP/0/L/IMG6151-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-zzWnrfP/0/L/IMG6151-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-QHK6P6T/0/L/IMG6160-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-QHK6P6T/0/L/IMG6160-L.jpg" width="400" /></a></div>
<br />
吃完晚餐,意猶未盡的再逛了一大圈Carcassonne古城,<br />
晚上打了燈光古城,別有一番風味。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-XrmKpW8/0/L/IMG6175-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-XrmKpW8/0/L/IMG6175-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-wjjjSPN/0/L/IMG6219-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-wjjjSPN/0/L/IMG6219-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
夜晚的Carcassonne,其實也是很熱鬧的呢</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-HSwKJSH/0/L/IMG6227-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-HSwKJSH/0/L/IMG6227-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-vV9R9Tw/0/L/IMG6166-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-vV9R9Tw/0/L/IMG6166-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Carcassonne 地圖</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-w6JDRkF/0/L/IMG6226-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110929-Frence-Day06/i-w6JDRkF/0/L/IMG6226-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
<div style="text-align: center;">
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-77261519753521470422011-11-07T17:00:00.001+08:002011-11-09T17:08:50.517+08:00Southern France Day05<div style="text-align: center;">
第五天</div>
<div style="text-align: center;">
Avignon-->Fontaine de Vaucluse-->Musée de la Lavande<br />
-->Gordes-->Roussillon-->Avignon</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
第五天的旅遊地圖如下:<br />
<a href="http://maps.google.com.tw/maps/ms?msid=200243770484793006040.0004aee1133079ed518e5&msa=0&ll=43.910261,5.048904&spn=0.399203,0.891953" target="_blank">Google Maps</a><br />
第五天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/19643813_8HJKxr" target="_blank">20110928 Frence Day05</a><br />
<br />
一大早從Avignon出發後,在冷冷的氣溫中來到了Fontaine de Vauclues,<br />
有條清澈的小溪流過的小鎮,再往上游走去,<br />
會有一個大石灰岩洞,就是溪水源頭,不過我們就沒有去了,有點可惜<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-fgbZWgq/0/L/IMG5148-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-fgbZWgq/0/L/IMG5148-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-s6GMsRZ/0/L/IMG5178-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-s6GMsRZ/0/L/IMG5178-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
接下來到了一個Musée de la Lavande(薰衣草博物館),</div>
<div class="separator" style="clear: both; text-align: center;">
其實就是一個薰衣草的購物站,大家都拼命買買買買</div>
<div class="separator" style="clear: both; text-align: center;">
買完東西,耗費了一堆體力,就該吃飯補充了</div>
<div class="separator" style="clear: both; text-align: center;">
冷湯+小牛肉+冰淇淋甜點</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-KFWMnjB/0/L/IMG5242-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-KFWMnjB/0/L/IMG5242-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-kwvNFZw/0/L/IMG5244-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-kwvNFZw/0/L/IMG5244-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-QR9RJ6r/0/L/IMG5249-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-QR9RJ6r/0/L/IMG5249-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-czHTDR2/0/L/IMG5259-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-czHTDR2/0/L/IMG5259-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
帶著吃飽飽的肚子上車,肚皮緊眼皮鬆的一覺醒來,</div>
<div class="separator" style="clear: both; text-align: center;">
就到了有名的Gordes,先在路上的觀景台拍拍Gordes全景照</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-3H7frsS/0/L/IMG5269-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-3H7frsS/0/L/IMG5269-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-Dk64pg3/0/L/IMG529407-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-Dk64pg3/0/L/IMG529407-L.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Gordes也是一個很多藝術家住的可愛小山城</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-J4vpWKM/0/L/IMG5309-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-J4vpWKM/0/L/IMG5309-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-LmFPPxb/0/L/IMG5312-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-LmFPPxb/0/L/IMG5312-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-s4T4sxz/0/L/IMG5360-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-s4T4sxz/0/L/IMG5360-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-zWRtm7p/0/L/IMG5369-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-zWRtm7p/0/L/IMG5369-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
當然也會有辣妹遊客出現 XD</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-SjFL5s4/0/L/IMG5401-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-SjFL5s4/0/L/IMG5401-L.jpg" width="400" /></a></div>
<br />
接下來到了紅色山城 Roussillon,因為當地土壤是紅色的,<br />
就地取材,所以蓋出來的房子都帶有紅色<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-n2FQmzC/0/L/IMG5433-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-n2FQmzC/0/L/IMG5433-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-jdvTvLV/0/L/IMG5440-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-jdvTvLV/0/L/IMG5440-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-K3m2Fvb/0/L/IMG5452-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-K3m2Fvb/0/L/IMG5452-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-6kgQv2r/0/L/IMG5467-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-6kgQv2r/0/L/IMG5467-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-5JJvLZJ/0/L/IMG5472-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-5JJvLZJ/0/L/IMG5472-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-VNR4TRF/0/L/IMG5476-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-VNR4TRF/0/L/IMG5476-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-wnJhWj8/0/L/IMG5488-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-wnJhWj8/0/L/IMG5488-L.jpg" width="400" /></a></div>
<br />
結束了Roussillon的行程,一行人搭車回到Avignon的 Notre-Dame des Doms(教皇宮)旁,<br />
享受露天豐盛的晚餐。<br />
番茄蔬菜湯+鴉肉+紅莓果派<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-8LgCrQS/0/L/IMG5531-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-8LgCrQS/0/L/IMG5531-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-nn3WSx2/0/L/IMG5533-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-nn3WSx2/0/L/IMG5533-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-VpjbN5s/0/L/IMG5544-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-VpjbN5s/0/L/IMG5544-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-wwk8JN4/0/L/IMG5555-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110928-Frence-Day05/i-wwk8JN4/0/L/IMG5555-L.jpg" width="400" /></a></div>
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-17086851074866867922011-11-07T11:59:00.001+08:002011-11-09T17:08:50.462+08:00Southern France Day04<div style="text-align: center;">
第四天</div>
<div style="text-align: center;">
Massalia-->Massalia港口-->Pont du Gard (嘉德水道橋)-->Notre-Dame des Doms(教皇宮)<br />
-->Pont Saint-Bénezet (聖貝內澤橋)-->Avignon</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
<br />
第四天的旅遊地圖如下:<br />
<a href="http://maps.google.com.tw/maps/ms?msid=200243770484793006040.0004aee11215943c8106c&msa=0&ll=43.639057,4.952087&spn=0.825884,1.783905" target="_blank">Google Maps</a><br />
第四天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/19550209_LnGZwB" target="_blank">20110927 Frence Day04</a><br />
<br />
<br />
出發後,沿著馬賽的海邊來到了港口拍拍照。<br />
閒晃了一下,就上車往Pont du Gard 嘉德水道橋出發了。<br />
<br />
港口賣花攤販,顏色可繽紛的呢<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-Ghtw43D/0/L/IMG4703-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-Ghtw43D/0/L/IMG4703-L.jpg" width="400" /></a></div>
<br />
Pont du Gard的團體照<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-2jXFxJQ/0/L/IMG4729-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-2jXFxJQ/0/L/IMG4729-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Pont du Gard</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-dWGLJpP/0/L/IMG4748-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-dWGLJpP/0/L/IMG4748-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-2z6vNHL/0/L/IMG4736-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-2z6vNHL/0/L/IMG4736-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-qHVWX3B/0/L/IMG4766-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-qHVWX3B/0/L/IMG4766-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-6zDhxG5/0/L/IMG4782-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-6zDhxG5/0/L/IMG4782-L.jpg" width="400" /></a></div>
<div class="" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: center;">
Pont du Gard 附近的風景</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-xZs7fn4/0/L/IMG4773-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-xZs7fn4/0/L/IMG4773-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-S5vWP8n/0/L/IMG4774-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-S5vWP8n/0/L/IMG4774-L.jpg" width="264" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-Vnz4T4v/0/L/IMG4779-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-Vnz4T4v/0/L/IMG4779-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
逛完水道橋,時間接近中午,該吃午餐了,</div>
<div class="separator" style="clear: both; text-align: center;">
這一頓據說是此行最貴的一餐,每人好像要80歐</div>
<div class="separator" style="clear: both; text-align: center;">
前菜的馬卡龍是羊肉奶油口味,很騷 :P</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-qctvQzw/0/L/IMG4798-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-qctvQzw/0/L/IMG4798-L.jpg" width="264" /></a></div>
<br />
加了鵝肝的某種濃湯<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-2fvVF2K/0/L/IMG4801-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-2fvVF2K/0/L/IMG4801-L.jpg" width="400" /></a></div>
<br />
麵包<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-qTLgcT6/0/L/IMG4803-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-qTLgcT6/0/L/IMG4803-L.jpg" width="400" /></a></div>
<br />
主菜是水煮豬肉,source還不錯,但是肉質煮過頭<strike>色色</strike>澀澀的,不怎樣<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-XJ5qRsz/0/L/IMG4808-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-XJ5qRsz/0/L/IMG4808-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
重頭戲甜點來了,種類多口味讚,裝飾漂亮,讚,大推。</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-L2ZkFGG/0/L/IMG4814-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-L2ZkFGG/0/L/IMG4814-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-rtQQKwQ/0/L/IMG4827-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-rtQQKwQ/0/L/IMG4827-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-M2zVg5b/0/L/IMG4825-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-M2zVg5b/0/L/IMG4825-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-GtjdWps/0/L/IMG4831-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-GtjdWps/0/L/IMG4831-L.jpg" width="400" /></a></div>
<br />
酒足飯飽後,來到亞維農內的Notre-Dame des Doms(教皇宮),Pont du Gard (嘉德水道橋)逛逛<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-6h3dLJg/0/L/IMG4875-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-6h3dLJg/0/L/IMG4875-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-CcrNgXp/0/L/IMG4878-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-CcrNgXp/0/L/IMG4878-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-JmRzcTF/0/L/IMG4904-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-JmRzcTF/0/L/IMG4904-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-zmRHzxC/0/L/IMG4920-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-zmRHzxC/0/L/IMG4920-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-Tb332Fj/0/L/IMG4910-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-Tb332Fj/0/L/IMG4910-L.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
出了Notre-Dame des Doms,走一小段路就到了<span class="Apple-style-span" style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: x-small; line-height: 13px;">Pont Saint-Bénezet (聖貝內澤橋)</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-pp4BvPW/0/L/IMG4973-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-pp4BvPW/0/L/IMG4973-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-LvBj6Jn/0/L/IMG5020-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-LvBj6Jn/0/L/IMG5020-L.jpg" width="400" /></a></div>
<br />
晃完斷橋,也差不多時間該去吃晚餐了。 XD<br />
鵝肝沙拉、鴨腿、還有甜點<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-LdbCfhr/0/L/IMG5046-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-LdbCfhr/0/L/IMG5046-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-zhpBHzR/0/L/IMG5051-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-zhpBHzR/0/L/IMG5051-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-FgRXTn4/0/L/IMG5081-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-FgRXTn4/0/L/IMG5081-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
坐在河邊吃飯,旁邊就是水面斷橋夕陽的美景,</div>
<div class="separator" style="clear: both; text-align: center;">
果然是個賣景色+氣氛的餐廳 XD</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-sN73Zhz/0/L/IMG507678HDR-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-sN73Zhz/0/L/IMG507678HDR-L.jpg" width="400" /></a></div>
<br />
晚上的飯店就在Avignont城牆外,所以放完行李,就又跑出來逛街拍照<br />
晚上的城牆、建築另有一番特色<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-pdhm8jL/0/L/IMG5100-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="264" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-pdhm8jL/0/L/IMG5100-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-XfgtP7B/0/L/IMG5103-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-XfgtP7B/0/L/IMG5103-L.jpg" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-mcdg9cB/0/L/IMG5122-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110927-Frence-Day04/i-mcdg9cB/0/L/IMG5122-L.jpg" width="264" /></a></div>
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-25524511751804353912011-11-04T00:52:00.003+08:002011-11-10T23:48:59.155+08:00Southern France Day03<div style="text-align: center;">
第三天</div>
<div style="text-align: center;">
Nice-->SaintPaul-->Antibes-->Aix-en-Provence</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
<br />
第三天的旅遊地圖如下:<br />
<a href="http://maps.google.com.tw/maps/ms?msid=200243770484793006040.0004aee11101f61c48faf&msa=0&ll=43.69419,7.082148&spn=0.051571,0.132093" target="_blank">Google Maps</a><br />
第三天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/19532370_GLWBfX" target="_blank">20110926 Frence Day03</a><br />
<br />
今天出發後先到蔚藍海岸看比基尼辣媽,然後到了一個可愛的小山城Saint Paul,<br />
<br />
一堆藝術家小店,躲在彎彎曲曲的小巷道中,轉個彎就是驚喜。<br />
<br />
<br />
蔚藍海岸的清晨<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-sWZRRDx/0/L/IMG4238-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-sWZRRDx/0/L/IMG4238-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
比基尼辣媽</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-HwFnGTq/0/L/IMG4249-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-HwFnGTq/0/L/IMG4249-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
天氣大好的蔚藍海岸,果然一整片藍</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-Nn6MRx3/0/L/IMG4263-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-Nn6MRx3/0/L/IMG4263-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Saint Paul 小山城,可惜待的時間太短了,</div>
<div class="separator" style="clear: both; text-align: center;">
很喜歡在這邊閒晃的感覺</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-S2tm8wz/0/L/IMG4370-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-S2tm8wz/0/L/IMG4370-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-3F5mG6Z/0/L/IMG4371-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-3F5mG6Z/0/L/IMG4371-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-Lfmnhs3/0/L/IMG4377-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-Lfmnhs3/0/L/IMG4377-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-btwLWbv/0/L/IMG4411-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-btwLWbv/0/L/IMG4411-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-TCjJscJ/0/L/IMG4425-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-TCjJscJ/0/L/IMG4425-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
離開Saint Paul前,剛好遇到金龜車隊,有可愛到 XD</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-sDmf86D/0/L/IMG4430-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-sDmf86D/0/L/IMG4430-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
安提布教堂
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-Tb4SFRR/0/L/IMG4485-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-Tb4SFRR/0/L/IMG4485-L.jpg" width="266" /></a></div>
<br />
愛車Ducati,先借法國人騎一下,哼哼~<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-fDXJ7tk/0/L/IMG4498-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-fDXJ7tk/0/L/IMG4498-L.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
到了Aix-en-Provence,有名的景點是塞尚住過的地方,<br />
是一間小咖啡店樓上,現在咖啡店旁邊的牆做了雕像跟噴水嘴,<br />
我也不知道賽尚跟下面那兩個吐口水小鬼有甚麼關係 ^_^!!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-RqVHrwJ/0/L/IMG4501-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-RqVHrwJ/0/L/IMG4501-L.jpg" width="266" /></a></div>
<br />
Aix-en-Provence街景<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-HVM9WCx/0/L/IMG4510-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-HVM9WCx/0/L/IMG4510-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-tV8R7Cd/0/L/IMG4515-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-tV8R7Cd/0/L/IMG4515-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-WKPZpsP/0/L/IMG4517-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-WKPZpsP/0/L/IMG4517-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
逛累了,當然就到了晚餐時間,<br />
一樣是三道式米其林餐聽<br />
番茄起司片沙拉、肋排佐馬鈴薯泥、焦糖烤布丁<br />
喔......對了,中午因為是吃中國式吃到飽餐廳,<br />
因為不怎麼樣,所以根本沒有記錄下來 XD<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-pVCn6vC/0/L/IMG4526-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-pVCn6vC/0/L/IMG4526-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-tdNqknV/0/L/IMG4544-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-tdNqknV/0/L/IMG4544-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-VcjTcrR/0/L/IMG4555-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-VcjTcrR/0/L/IMG4555-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
晚餐結束後,拉了一段車,大約快一小時,住到馬賽去。</div>
<div class="separator" style="clear: both; text-align: center;">
旅館鄰近海邊,就在快到旅館的路上,發現海邊有摩天輪。</div>
<div class="separator" style="clear: both; text-align: center;">
所以放好行李馬上偷跑出來自強活動,</div>
<div class="separator" style="clear: both; text-align: center;">
摩天輪一個人四歐,不過可能因為太晚沒人了,</div>
<div class="separator" style="clear: both; text-align: center;">
我們坐了七八圈,坐到屁股痛才下來,真是值回票價的繞圈圈啊~~~</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-bMtbmWp/0/L/IMG4572-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-bMtbmWp/0/L/IMG4572-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-fJDMBjG/0/L/IMG4579-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-fJDMBjG/0/L/IMG4579-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
這個摩天輪雖然沒有很高,大約五六層樓,</div>
<div class="separator" style="clear: both; text-align: center;">
不過很酷的是,他的座位是沒有安全帶,也不是密閉式的,</div>
<div class="separator" style="clear: both; text-align: center;">
剛開始搭上去搖來晃去的,還蠻刺激的 XD</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-mGFT6gw/0/L/IMG4641-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-mGFT6gw/0/L/IMG4641-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
摩天輪上看下來的夜景</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-dJCttWn/0/L/IMG4591-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-dJCttWn/0/L/IMG4591-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
馬賽海邊的夜景,寬景圖</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-KTnPKc8/0/L/IMG4660-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-KTnPKc8/0/L/IMG4660-L.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
最後就來個瘋狂摩天輪作為美好一天的結尾吧<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-dQT6W8x/0/L/IMG4667-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110926-Frence-Day03/i-dQT6W8x/0/L/IMG4667-L.jpg" width="266" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-64342712820236284942011-11-02T01:11:00.004+08:002011-11-09T17:08:50.500+08:00Southern France Day02<div style="text-align: center;">
第二天</div>
<div style="text-align: center;">
Malpensa@Milano-->Monaco-->Nice</div>
<div style="text-align: center;">
</div>
<a name='more'></a><div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br />
在飛機上被關了十幾個小時候,終於抵達米蘭的機場,<br />
出了機場馬上又被關上遊覽車,再花六個小時開開開到Monaco。</div>
<div style="text-align: center;">
第二天的旅遊地圖如下:<br />
<a href="http://www.blogger.com/"></a><span id="goog_552628550"></span><span id="goog_552628551"></span><a href="http://maps.google.com.tw/maps/ms?msid=200243770484793006040.0004aeda7267a9884ebfe&msa=0&ll=44.941473,8.629761&spn=3.324313,8.453979" target="_blank">Google Maps</a><br />
第二天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/19532029_gDxB6q" target="_blank">20110925 France Day02</a><br />
<br />
<br /></div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
義大利高速公路休息站內的麵包師傅<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-sz7m86w/0/L/IMG3882-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-sz7m86w/0/L/IMG3882-L.jpg" width="400" /></a></div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
摩納哥的遊街小火車<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-dB5GjLL/0/L/IMG3915-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-dB5GjLL/0/L/IMG3915-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
到了摩納哥,先解決午餐再來逛街</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-PPfctMD/0/L/IMG3932-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-PPfctMD/0/L/IMG3932-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-kLm444d/0/L/IMG3940-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-kLm444d/0/L/IMG3940-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-cv8MkDq/0/L/IMG3943-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-cv8MkDq/0/L/IMG3943-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Monaco教堂</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-BSCVfwP/0/L/IMG3988-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-BSCVfwP/0/L/IMG3988-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-CqzRz8c/0/L/IMG3991-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-CqzRz8c/0/L/IMG3991-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Give Me Fiveeeee~</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-JVZQBHN/0/L/IMG3998-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-JVZQBHN/0/L/IMG3998-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
身為F1迷,一定要拍的U-Turn & Tunnel</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-qqkcmBj/0/L/IMG4077-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-qqkcmBj/0/L/IMG4077-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-FCfN3Nc/0/L/IMG4080-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-FCfN3Nc/0/L/IMG4080-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Monaco的計程車都是賓士,所以雙逼在這邊算國民車,看點不一樣的</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-H8NXBVq/0/L/IMG4016-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-H8NXBVq/0/L/IMG4016-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-7NzSvH3/0/L/IMG4018-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-7NzSvH3/0/L/IMG4018-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-GtMdx9L/0/L/IMG4021-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-GtMdx9L/0/L/IMG4021-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Casino Monte-Carlo,看起來就很高檔,穿拖鞋短褲的我應該進不去。</div>
<div class="separator" style="clear: both; text-align: center;">
而且進去不能照相,只能出手賭一把或是看別人算籌碼。</div>
<div class="separator" style="clear: both; text-align: center;">
身上錢也不夠,就算脫褲子當給他們,應該也換不到一個籌碼。</div>
<div class="separator" style="clear: both; text-align: center;">
所以只能在外面聞一聞 XD</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-WCDqLMB/0/L/IMG4022-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-WCDqLMB/0/L/IMG4022-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Ferrari Driving Experience,15分鐘49歐,有錢真好</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-FHRK2js/0/L/IMG4110-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-FHRK2js/0/L/IMG4110-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
在尼斯的街上遇到一隻有特異功能自己牽自己遛狗的狗... (好饒舌的句子啊 Orz)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-7xgJKXh/0/L/IMG4123-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-7xgJKXh/0/L/IMG4123-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
又到了晚餐時間,主餐是鮭魚</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-r5GQxFP/0/L/IMG4172-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-r5GQxFP/0/L/IMG4172-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-m9WZVsM/0/L/IMG4173-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-m9WZVsM/0/L/IMG4173-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-vRbdjJg/0/L/IMG4178-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-vRbdjJg/0/L/IMG4178-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
飯後甜點是米其林推薦的冰淇淋</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-5ggn6KR/0/L/IMG4181-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-5ggn6KR/0/L/IMG4181-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
飯店的奇妙擺飾,看起來有一種魔術的感覺 XD</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-jv9dsmx/0/L/IMG4184-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110925-France-Day02/i-jv9dsmx/0/L/IMG4184-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div style="text-align: center;">
</div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-7570037059268345642011-11-01T23:06:00.000+08:002011-11-09T17:08:50.510+08:00Southern France Day01<div style="text-align: center;">
第一天</div>
<div style="text-align: center;">
台北-->中正機場-->曼谷機場-->米蘭</div>
<div style="text-align: center;">
<br /></div>
<a name='more'></a><div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
旅行的第一天,基本上就是一整個移動日,</div>
<div style="text-align: center;">
從台北出發到中正機場,搭三個半小時飛機到曼谷機場,再飛飛飛11個小時到米蘭。<br />
<br />
第一天的全部相片在此:<br />
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/19529782_Xx9xJ7" target="_blank">20110924 France Day01</a><br />
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
這次參加的是巨匠旅遊的團</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-53D5DF5/0/L/IMG3804-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-53D5DF5/0/L/IMG3804-L.jpg" width="266" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
中正機場亂亂拍</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-zWXJPH3/0/L/IMG3806-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-zWXJPH3/0/L/IMG3806-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-GgHtCfg/0/L/IMG3807-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-GgHtCfg/0/L/IMG3807-L.jpg" width="400" /></a></div>
<div style="text-align: center;">
<br />
最近蔣先生相關產品很紅<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-RsfNxBb/0/L/IMG3812-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-RsfNxBb/0/L/IMG3812-L.jpg" width="400" /></a></div>
<br />
曼谷機場再亂拍<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-9DMPdzQ/0/L/IMG3841-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-9DMPdzQ/0/L/IMG3841-L.jpg" width="266" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-m7FpTVb/0/L/IMG3843-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-m7FpTVb/0/L/IMG3843-L.jpg" width="400" /></a></div>
<br />
曼谷到米蘭的飛機有電視,哈哈~真好~~<br />
預計飛行時間要11:18<br />
曼谷當地大約00:30起飛<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-FCFtkj7/0/L/IMG3844-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-FCFtkj7/0/L/IMG3844-L.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
飛機上吃飽睡,睡飽吃,好幾頓飛機餐的餵食下,差不多整路都在睡 XD<br />
窗外的日出雖然漂亮,但是睡覺還是比較重要<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-J3cvWCV/0/L/IMG3858-L.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="http://photo.jake.idv.tw/Galleries/Travel-Abroad/20110924-France-Day01/i-J3cvWCV/0/L/IMG3858-L.jpg" width="400" /></a></div>
<br /></div>Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0tag:blogger.com,1999:blog-658947996677319057.post-7648021155424988602011-09-20T23:08:00.004+08:002011-09-20T23:08:43.038+08:00Jake a BreakSometimes we need a break.....<br />
<br />
<a name='more'></a><br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdOjabGd-c03GIrxE7F4986RoKXVTIsIRIkdOyurayIFDOwE3hmLd6zY-Tl8-A0PTcyE44g2FGQkm1yXmOKXgvkUQO2ArKBFdZfcPAARxBEpNVfus2XiAYsSgW-LN6yPUnmMiaG2-T1kY/s1600/IMG_3734_2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdOjabGd-c03GIrxE7F4986RoKXVTIsIRIkdOyurayIFDOwE3hmLd6zY-Tl8-A0PTcyE44g2FGQkm1yXmOKXgvkUQO2ArKBFdZfcPAARxBEpNVfus2XiAYsSgW-LN6yPUnmMiaG2-T1kY/s320/IMG_3734_2.JPG" width="320" /></a></div>
<br />
<span class="Apple-style-span" style="font-size: large;">J</span><span class="Apple-style-span" style="color: #999999; font-size: x-small;">ust t</span><span class="Apple-style-span" style="font-size: large;">AKE A BREAK</span>.....Anonymoushttp://www.blogger.com/profile/01315796936978125342noreply@blogger.com0