Chapter 1. General Unix and Advanced C
来源:互联网 发布:西方八一军演 知乎 编辑:程序博客网 时间:2024/06/05 11:53
Chapter 1. General Unix and Advanced C
- Table of Contents
- Everything is a file!
- Abstraction and function pointers
- Standard File Descriptors
Everything is a file!
If you learn nothing else, you should remember that in UNIX everything is a file.
Imagine a file in the context something familiar like a word processor. There are two fundamental operations we can use on this imaginary word processing file
Read it (existing saved data from the word processor).
Write to it (new data from the user).
Now consider some of the common things attached to a computer and how they relate to our fundamental file operations.
The screen
The keyboard
A printer
A CDROM
The screen and printer are both like a write-only file, but instead of being stored as bits on a disk the information is displayer as dots on a screen or lines on a page. The keyboard is like a read only file with the data coming from keystrokes and the CDROM is similar but rather than randomly coming from the user the data is stored directly on the disk.
Thus a file is a good abstraction of all the devices attached to the computer. Some files may be read-only, or write-only, or indeed both.
Prev
Home
Next
About the course
Abstraction and function pointers
原文链接:http://bottomupcs.sourceforge.net/csbu/c57.htm
- Chapter 1. General Unix and Advanced C
- Chapter 7. Advanced DirectDraw and Bitmapped Graphics
- !!!Chapter 12 Advanced Data Structure and Implementation
- C++ Chapter 1. General(综述)
- 【c++】PAT (Advanced Level)1019. General Palindromic Number (20)
- M202: MongoDB Advanced Deployment and Operations - Chapter 5: Log Files
- C and UNIX Standards
- 本周技术关注:Advanced Linux and Unix Programming
- 读Advanced C and C++ Compiling
- Eclipse missing C/C++ build and general from project properties
- 读书笔记之 Advanced Bash-Scripting Guide Chapter 4 Introduction to Variables and Parameters
- M202: MongoDB Advanced Deployment and Operations - Chapter 4: Sharded Cluster Management
- General Rules and Limitations
- Advanced Programming in the UNIX® Environment: Second Edition(Chapter 3. File I/O 3.1 3.2 3.3)
- PAT (Advanced) 1019. General Palindromic Number (20)
- Advanced DBA certification guide and reference for DB2 universal database v8 for Linux, UNIX, and Wi
- Chapter 19:Advanced Function Topics
- PpLK: |Practical Java| Chapter 1 General Techniques
- C++ 中string::size_type相关问题
- PNG Decoder技术详解(一)
- AJAX跳转页面
- Hibernate中HibernateUtil
- About the course
- Chapter 1. General Unix and Advanced C
- 连接池连接数据库问题---已解决!
- 获取场景中两个Object之间的距离
- android 新浪微博客户端的表情功能的实现
- c语言中头文件与函数文件
- Abstraction and function pointers
- 社交中该如何把握“亲密度”?
- 解决ora 01033
- spring 中加载xml配置文件的方式