Linux

這帽子扣得真大

Posted on 四月 27, 2009. Filed under: Linux, 閒聊 |

http://groups.google.com/group/planet-linux-of-taiwan/browse_thread/thread/94cd14c2ee737bec
我是很尊敬前輩的……

Read Full Post | Make a Comment ( None so far )

enable mouse in vim

Posted on 三月 12, 2009. Filed under: Linux |

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>

Read Full Post | Make a Comment ( None so far )

backup my vimrc

Posted on 三月 3, 2009. Filed under: Linux | Tags: , |

” 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 [...]

Read Full Post | Make a Comment ( None so far )

ubuntu ethxx rename

Posted on 二月 5, 2009. Filed under: Linux | Tags: , , |

不知道為甚麼,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

Read Full Post | Make a Comment ( None so far )

sed – 字串取代

Posted on 一月 19, 2009. Filed under: Linux |

將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

Read Full Post | Make a Comment ( None so far )

better df

Posted on 一月 12, 2009. Filed under: Linux |

有顏色,有進度條
pydf
http://linuxtoy.org/archives/pydf.html
下載:  http://kassiopeia.juls.savba.sk/~garabik/software/pydf/

Read Full Post | Make a Comment ( None so far )

yUM for fedora Core 4

Posted on 一月 9, 2009. Filed under: Linux |

http://archives.fedoraproject.org/pub/archive/fedora/linux/

Read Full Post | Make a Comment ( None so far )

Hacker的幽默?

Posted on 六月 20, 2008. Filed under: Linux, 菸酒生歲月, 閒聊 |

Journaling Flash Filesystem 是 Log 類型
LogFS  是 Journaling 類型

Read Full Post | Make a Comment ( None so far )

SSH Server 登入過慢

Posted on 六月 18, 2008. Filed under: Linux | Tags: , , |

通常是因為開啟了Domain Name 反查
修改 /etc/ssh/sshd_config
加入一行 UseDNS no
另一個方法:
把client  端的 ip & hostname 加到 ssh server 那台電腦裡的 /etc/hosts

Read Full Post | Make a Comment ( None so far )

Ubuntu 8.04 hardy, APT source list (Taiwan)

Posted on 六月 11, 2008. Filed under: Linux | Tags: , , , |

用臺灣高品質學術研究網路的Repositories
http://ftp.twaren.net/Linux/Ubuntu/ubuntu/

Read Full Post | Make a Comment ( None so far )

debian 出大包了

Posted on 五月 20, 2008. Filed under: Bookmarks, Linux, 菸酒生歲月 | Tags: , , |

因為一個疏忽,出了一個大漏洞,導致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)

Read Full Post | Make a Comment ( None so far )

Ubuntu 7.10 gusty, 台灣的source list

Posted on 五月 14, 2008. Filed under: Linux | Tags: , , |

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

Read Full Post | Make a Comment ( 1 so far )

Autotools

Posted on 五月 5, 2008. Filed under: Linux | Tags: |

利用 Autotools 來建立 Makefile 檔案

Read Full Post | Make a Comment ( None so far )

受保護:S3C2440, USB in Linux

Posted on 四月 28, 2008. Filed under: Linux, 嵌入式相關, 菸酒生歲月 | Tags: , , , , , , , , , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

受保護:DEBUGFS Support

Posted on 四月 28, 2008. Filed under: Linux, 嵌入式相關, 菸酒生歲月 | Tags: , , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

ASUS WL-167G (USB WLAN Adapter) For ARM Linux

Posted on 四月 28, 2008. Filed under: Linux, 菸酒生歲月 | Tags: , , , , , , |

great~ it offers linux driver~
copy the directory Linux/rt73 in the Driver CDROM    ( remember to chmod +w )
follow the README in Linux/rt73/module/
if you got error “undefined get_wireless_stats“
just fix rtmp_main.c, replace  netdev->get_wireless_stats to netdev->get_stats
=======================================
編譯module
網路上有非官方driver : rt2×00 project
每天最新版本
或是直接用CVS更新
cvs -d:pserver:anonymous@rt2400.cvs.sourceforge.net:/cvsroot/rt2400 login
cvs -z3 -d:pserver:anonymous@rt2400.cvs.sourceforge.net:/cvsroot/rt2400 co -P source/rt73
修改Makefile
最前面增加五行
ARCH=arm
CROSS_COMPILE=/usr/local/arm/3.4.1/bin/arm-linux-
KERNDIR=/home2/fyodor/kernel/linux-2.6.25__from__2.6.24.3
(KERNDIR要指到目標板所使用的KERNEL SOURCE,而且KERNEL必須先設定好交叉編譯)
ROOTFS = /home2/fyodor/filesystem/rootfs
MODDIR = /lib/modules/2.6.24.3/extra
把module install 的目標位置依照目標kernel版本設定
否則就會安裝到目前uname -r 所找到的kernel module位置…
ps. make install時,modules.dep的設定不會跟著MODDIR而改變
所以還是得設定成extra
修改一行
FIRM_DIR [...]

Read Full Post | Make a Comment ( 4 so far )

NAND Flash ~ empty flash 問題

Posted on 四月 22, 2008. Filed under: Linux, 嵌入式相關, 菸酒生歲月 | Tags: , |

Openmoko – 惱人的 Empty flash 問題
# sumtool -e 0×20000 –no-cleanmarkers –littleendian -i output/rootfs.jffs2 -o output/newrootfs.jffs2

Read Full Post | Make a Comment ( None so far )

warning: `regparm’ attribute directive ignored

Posted on 四月 19, 2008. Filed under: Linux, 嵌入式相關, 菸酒生歲月 | Tags: , , |

交叉編譯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

Read Full Post | Make a Comment ( None so far )

受保護:diff & patch 用法

Posted on 四月 18, 2008. Filed under: Linux, 菸酒生歲月 | Tags: , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

受保護:Linux Driver – Platform Device

Posted on 四月 11, 2008. Filed under: Linux, 嵌入式相關, 菸酒生歲月 | Tags: , , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

受保護:Wireless tools for ARM Linux

Posted on 四月 8, 2008. Filed under: Linux, 小小心得, 嵌入式相關, 菸酒生歲月 | Tags: , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

受保護:Linux Kernel modules in busybox

Posted on 四月 3, 2008. Filed under: Linux, 嵌入式相關, 菸酒生歲月 | Tags: , , , , , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

vimpress

Posted on 四月 3, 2008. Filed under: Linux | Tags: |

測試用vim寫wordpress….

Read Full Post | Make a Comment ( None so far )

受保護:module 相關指令 & 設定

Posted on 四月 1, 2008. Filed under: Linux, 菸酒生歲月 | Tags: , , , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

Linux 裡 S3C2440 的initial 順序

Posted on 四月 1, 2008. Filed under: Linux, 小小心得, 嵌入式相關 | Tags: , , , |

init order in linux of s3c2440

Read Full Post | Make a Comment ( None so far )

受保護:交叉編譯usbutils

Posted on 三月 28, 2008. Filed under: Linux, 菸酒生歲月 | Tags: , , , |

此為加密文章,因此無法看到摘要。

Read Full Post | Make a Comment ( 輸入密碼才能查看留言 so far )

奇怪的錯誤

Posted on 三月 28, 2008. Filed under: Linux, 菸酒生歲月 | Tags: |

昨天/dev/ttys0 用 minicom很順
今天就不行了
給我說 /dev/ttys0: Input/output error
goo了一下發現很多人遇到這個
奇怪改用/dev/ttyS0就好了

Read Full Post | Make a Comment ( None so far )

取代資料夾內所有檔案的字串

Posted on 三月 21, 2008. Filed under: Linux | Tags: , |

把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/’ {} \;

Read Full Post | Make a Comment ( None so far )

bin/bash^M: bad interpreter: no such file or directory

Posted on 三月 14, 2008. Filed under: Linux, 小小心得, 菸酒生歲月 |

通常會遇到這個問題的原因通常是
被執行的script檔案是從windows用ftp上傳,或是在windows複製 linux貼上
換行方式不一樣,導致這個錯誤
Windows裡換行是CR+LF,Linux裡只有LF    (CR = \r,LF = \n ….. in ascii code)
只要把windows裡使用的\r換行符號清除掉就可以了

Read Full Post | Make a Comment ( 1 so far )

ubuntu 7.10 gusty 安裝 dhcp-server

Posted on 二月 29, 2008. Filed under: Linux | Tags: , , , , , |

網路環境
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
# [...]

Read Full Post | Make a Comment ( None so far )

« Previous Entries

Liked it here?
Why not try sites on the blogroll...