Linux
這帽子扣得真大
http://groups.google.com/group/planet-linux-of-taiwan/browse_thread/thread/94cd14c2ee737bec
我是很尊敬前輩的……
enable mouse in vim
http://snpshu.blog.pingtung.org/post/2/68
"使用m$模式 source $VIMRUNTIME/mswin.vim behave mswin "使用mouse set mouse=a "指定term模式 set ttymouse=xterm2 "切換滑鼠模式快速鍵 map m :set mouse=a<CR> map <Leader>m :set mouse=<CR>
backup my vimrc
” 256 color depth
set t_Co=256
” paste without indent
set paste
” 顯示行號
set nu
set nobackup
set autoindent
colors asmdev
set cindent
set ruler
set tags=./tags,tags
set nocompatible
set backspace=2
set showmatch
” tab for cindent with 4 spaces
set shiftwidth=4
” tab = 4 spaces
set tabstop=4
” convert tab to space
set expandtab
syntax on
set et
” set noet
” F2 : 存檔(不關閉)
map :up
” F3 : 切換游標所在行劃底線
map :set cursorline!:echo “Highlight active cursor [...]
ubuntu ethxx rename
不知道為甚麼,eth0不見了,只剩下eth1
http://mydebian.blogdns.org/?p=177
# /etc/init.d/networking stop
首先要知道網路卡的driver module name
# lsmod (找出網路卡module : NICmod)
# rmmod NICmod
確認udev rule for NIC設定檔
通常在 /etc/udev/rules.d/xxx-net.rules
將它清空,重新載入NIC module
# modprobe NICmod
# /etc/init.d/networking start
sed – 字串取代
將a.txt裡面的xxx取代成yyy,存到b.txt
sed ’s/xxx/yyy/g’ a.txt > b.txt
取代行首
sed ’s/^/yyy/g’ a.txt > b.txt
取代行末
sed ’s/$/yyy/g’ a.txt > b.txt
better df
有顏色,有進度條
pydf
http://linuxtoy.org/archives/pydf.html
下載: http://kassiopeia.juls.savba.sk/~garabik/software/pydf/
yUM for fedora Core 4
http://archives.fedoraproject.org/pub/archive/fedora/linux/
Read Full Post | Make a Comment ( None so far )Hacker的幽默?
Journaling Flash Filesystem 是 Log 類型
LogFS 是 Journaling 類型
SSH Server 登入過慢
通常是因為開啟了Domain Name 反查
修改 /etc/ssh/sshd_config
加入一行 UseDNS no
另一個方法:
把client 端的 ip & hostname 加到 ssh server 那台電腦裡的 /etc/hosts
Ubuntu 8.04 hardy, APT source list (Taiwan)
用臺灣高品質學術研究網路的Repositories
http://ftp.twaren.net/Linux/Ubuntu/ubuntu/
debian 出大包了
因為一個疏忽,出了一個大漏洞,導致ssh key 容易被暴力破解
真不敢相信debian 這麼嚴謹的distro 會出這種錯誤
而且擺了一兩年
Serious Debian/Ubuntu openssl/openssh bug found
ubuntu 系出debian 當然也受影響(libssl-0.9.8)
受影響版本:
Ubuntu 7.04 (Feisty)
Ubuntu 7.10 (Gutsy)
Ubuntu 8.04 LTS (Hardy)
Ubuntu “Intrepid Ibex” (development): libssl <= 0.9.8g-8
Debian 4.0 (etch) (see corresponding Debian security advisory)
Ubuntu 7.10 gusty, 台灣的source list
deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ gutsy main universe restricted multiverse
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ gutsy main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ gutsy-security main restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ gutsy-security main restricted
deb http://tw.archive.ubuntu.com/ubuntu/ gutsy-security universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ gutsy-security universe
deb http://tw.archive.ubuntu.com/ubuntu/ gutsy-security multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ gutsy-security multiverse
deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ gutsy-updates universe main multiverse restricted
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ gutsy-updates universe main multiverse res
NAND Flash ~ empty flash 問題
Openmoko – 惱人的 Empty flash 問題
# sumtool -e 0×20000 –no-cleanmarkers –littleendian -i output/rootfs.jffs2 -o output/newrootfs.jffs2
warning: `regparm’ attribute directive ignored
交叉編譯rt73usb driver的時候,需要指定kernel source路徑
# cd RT73_Linux_STA_Drv1.0.4.0/Module
# make ARCH=arm CROSS_COMPILE=arm-linux-
\KERNDIR=/home2/fyodor/kernel/linux-2.6.25__from__2.6.24.3/
出現了這個警告
warning: `regparm’ attribute directive ignored
網路上查到是說
kernel src directory裡面的 include/asm
他是一個link,應該要指向corss compile目標
(在我這個情況就是asm-arm)
如果沒把asm 指到 asm-arm,就會出現這個warning
http://osdir.com/ml/linux.gps/2006-02/msg00049.html
http://linux.chinaunix.net/bbs/archiver/?tid-916672.html
可是我有正確指過去啊….怎麼還是出現這個warning
受保護:Linux Driver – Platform Device
此為加密文章,因此無法看到摘要。
Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )奇怪的錯誤
昨天/dev/ttys0 用 minicom很順
今天就不行了
給我說 /dev/ttys0: Input/output error
goo了一下發現很多人遇到這個
奇怪改用/dev/ttyS0就好了
取代資料夾內所有檔案的字串
把aaa 取代成 bbb (遇到特殊符號可以用\跳脫字元)
find ./ -type f -exec sed -i ’s/aaa/bbb/’ {} \;
把linux/config.h 取代成 linux/autoconf.h
find ./ -type f -exec sed -i ’s/linux\/config.h/linux\/autoconf.h/’ {} \;
bin/bash^M: bad interpreter: no such file or directory
通常會遇到這個問題的原因通常是
被執行的script檔案是從windows用ftp上傳,或是在windows複製 linux貼上
換行方式不一樣,導致這個錯誤
Windows裡換行是CR+LF,Linux裡只有LF (CR = \r,LF = \n ….. in ascii code)
只要把windows裡使用的\r換行符號清除掉就可以了
ubuntu 7.10 gusty 安裝 dhcp-server
網路環境
eth0 : 對外網卡使用固定ip
eth1 : 對內網卡使用class c ip : 192.168.1.1
安裝dhcp server
# aptitude install dhcp-server
修改interfaces設定
# vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 140.118.x.x
netmask 255.255.255.0
gateway 140.118.202.254
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
重開網路
# /etc/init.d/networking restart
修改 dhcpd 設定
# vim /etc/dhcp3/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 140.118.2.53;
option ip-forwarding off;
range dynamic-bootp 192.168.1.100 192.168.1.200;
default-lease-time 21600;
max-lease-time 43200;
}
重開dhcpd
# [...]
« Previous Entries



