2012年12月15日 星期六

[旅遊] 大雪山

久違的大雪山~~ 藍天白雲適合出遊的好天氣!



這裡的鳥被餵習慣了一點都不怕生


藍天在湖面的倒影美~~
















第一次看到野蜂窩蠻特別的!






2012年12月14日 星期五

[ubuntu] 小技巧


  ==========================================================
echo $PATH
  ==========================================================
find

find /etc -iname 'Network'


find /etc -iname 'apache2' -type d

   –type 參數值

b      block (buffered) special

c      character (unbuffered) special

d      directory ( 一般目錄 )

p      named pipe (FIFO)

f      regular file ( 一般檔案 )

l      symbolic link

s      socket

D      door (Solaris)
  ==========================================================
vi

顯示行數 :set nu
恢復 u
  ==========================================================

改電腦名稱

vim /etc/hostname

  ==========================================================

crontab   定期執行

  ==========================================================

安裝SAMBA
sudo apt-get install samba4
hw@ubuntu:/etc/samba$ sudo vim smb.conf

[workspaces]
   comment = workspaces
   path = /home/hw/workspaces/
   browseable = yes
   read only = no
   create mask = 774
   valid users = hw
   admin users = hw

hw@ubuntu:/etc/init.d$ samba restart

hw@ubuntu:/etc/samba$ sudo smbpasswd -a hw
New SMB password:
Retype new SMB password:
hw@ubuntu:/etc/samba$
  ==========================================================

[ubuntu] 使用rsync備份

1.裝rsync
apt-get install rsync

2.修改/etc/default/rsync
RSYNC_ENABLE=false --> RSYNC_ENABLE=true

3.修改 rsync 設定檔
vim /etc/rsyncd.conf


log file=/var/log/rsyncd.log
[Home]
path = /backup/Document
auth users = hw
uid = tsry
gid = tsry
secrets file = /etc/rsyncd.secrets
read only = no
strict modes = false #非root 必加

4.設定hw的帳號密碼
vi /etc/rsyncd.secrets
hw:hw1

PS. 注意權限和擁有者

5.啟動rsync
/etc/init.d/rsync start

測試






6.設定要登入的密碼
vim /tsry/rsyncd.secrets
內容只需打密碼
hw1





權限要設為 600,否則無法備份成功!

開始備份
rsync -avHS --numeric-ids --delete --password-file=/tsry/rsyncd.secrets /tsry/Documents/MyDocuments hw@127.0.0.1::Home



2012年12月13日 星期四

2012年12月8日 星期六

2012年11月24日 星期六

[旅遊] 新社花海

離家很近的新社花海,從第一次的感動到現在已經沒什麼感覺了,今年老天不賞臉花期間幾乎都下雨!!! 賞圖吧!