Skip to Content
自造手冊:新工業革命實務指南
book

自造手冊:新工業革命實務指南

by Paolo Aliverti, Andrea Maietta
March 2017
Intermediate to advanced
232 pages
4h 44m
Chinese
GoTop Information, Inc.
Content preview from 自造手冊:新工業革命實務指南
第 18 章 Raspberry Pi
180
使 用 nano 來 編 輯 檔 案 時,請 輸 入 nano
指令加上要編輯的檔案名稱:
pi@raspberrypi ~/test $ nano pi.txt
nano 最方便的地方是,如果要開啟的檔
案不存在,nano 會自動建立。請在檔案
中輸 入 Hello World! 這 段字。編輯完 成
之 後, 請 按 下 Control-O 再 按 Enter 或
Return 鍵來存檔。最後輸入 Control-X 離
開編輯器。
在 Linux 中, 不 需 要 使 用 編 輯 器 就
能 讀 取 檔 案 內 容;cat 指 令( 代 表
concatenate
)可將檔案內容顯示於主控
台:
pi@raspberrypi ~/test $ cat pi.txt
Hello World!
如果檔案很長的話,就只能在終端機視
窗中看到最後一段內容。您可使用一個
名為 less 這個指令來逐頁讀取:
pi@raspberrypi ~ $ less pi.txt
透過 less,您可逐列逐頁檢視檔案內容,
或直接跳到文字的開頭或結尾。要在文
字中移動時,可運用上下箭頭鍵、空白
鍵與 Enter 鍵(或 Return)。請按 下 q 鍵
就能離 開 less。按下 h 則會顯示可用指
令的簡短說明。
Raspberry Pi 有許多背景執行的程式;請
用 ps(
process status
) 指 令 來 看看 有 哪
些。
如果在指令後面加上一些參數的話,您
就能多少再取得一些關於執行中程序的
資訊;-ef 會顯示整個系統中所有執行中
程序的詳細清單。
pi@raspberrypi ~ $ ps -ef
一般來說,如果您要找任何關於作業系
統的資訊時,有兩個指令可以幫上忙:
apropos 與 man ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

優雅的SciPy|Python科學研究的美學

優雅的SciPy|Python科學研究的美學

Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
Presto实战

Presto实战

Matt Fuller, Manfred Moser, Martin Traverso

Publisher Resources

ISBN: 9789864763238