關於cat指令 - Linux

Table of Contents

在cat的時候碰到一個問題
如果要cat的東西out是不會停下來的
要如何輸出成可以處理的字串或檔案
例如
cat /dev/ttyS1 <-這是gps
由於gps會不庭吐資料
沒辦法用cat /dev/ttyS1 > tmp.txt
請問該如何解決

謝謝

--

All Comments

Necoo avatarNecoo2011-01-24
你是想每次讀個幾行嗎?
Jessica avatarJessica2011-01-25
試試看less?
Yuri avatarYuri2011-01-29
用行數的話...可以用 head,用大小的話,可以用 dd...
Edward Lewis avatarEdward Lewis2011-01-31
推樓上的 dd , binary 最好用 dd