Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
LINUX系統程式設計 第二版
by
Robert Love
December 2013
Intermediate to advanced
496 pages
8h 57m
Chinese
GoTop Information, Inc.
Content preview from
LINUX系統程式設計 第二版
288
|
第八章
unsigned int count);
int getdents (unsigned int fd,
struct dirent *dirp,
unsigned int count);
你不會想要使用這兩個系統呼叫!因為不好使用,而且不具移植性。事實上。用戶空間
應用程式應該使用
C
程式庫的
opendir()
、
readdir()
以及
closedir()
系統呼叫。
連結
前面在討論目錄的時候有提到,每個「名稱至
inode
」的映射(
mapping
)稱為一個
連結
(
link
)。另一個簡單的定義—連結基本上就是一份清單(一個目錄)中指向特定
inode
的一個名稱—說明了何以會有多個連結指向相同的
inode
。也就是,單一
inode
(因此是
單一檔案)可以被,例如,
/etc/customs
及
/var/run/ledger
所參照。
事實上,此狀況下,會有一個問題:因為連結會映射至
inode
,而
inode
編號專屬於特定
的檔案系統,所以
/etc/customs
與
/var/run/ledger
必須位於相同的檔案系統。在單一檔案
系統中,可能會有大量的連結指向任何特定的檔案。唯一的限制是用於保存「連結之數
量」的整數資料型別的大小。這些連結中,沒有一個連結是“最初的”或“第一個”連
結。所有這些連結均共享同樣的狀態:指向同一個檔案。
我們稱這些連結的型態為
硬連結
(
hard link
)。檔案可能具有零、一或多個連結。多數
檔案都會具有值為
1
的「連結計數」(
link count
)—也就是 ...
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.
Start your free trial
You might also like
優雅的SciPy|Python科學研究的美學
Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
成為卓越程式設計師的38項必修法則
Pete Goodliffe
深入理解運算原理|從簡單的機器到無所不能的程式
Tom Stuart
C++语言导学(原书第2版)
本贾尼 斯特劳斯特鲁普
Publisher Resources
ISBN: 9789862769812