Chapter 1: getting start
任何一本書都不可能適合任何人,這本書適合沒有任何linux經驗的C程式員
這章主要是介紹了unix linux gun的發展曆史,
Unix is a trademark by The Open Group and source code belongs to SCO.
Unix phliosophy: The why we choose Unix.有點老掉牙的話題
這本書講的卻非常精闢:
1 what is Simplicity,
Small&simple in utilites
2 Focus,
It means,from the requirement ,we first break down the user needs.Then we try very small utilites which combined to perform. asingle
purpose so that easy to perform. and improve later for the betteralgorithms
and interface.
3 Reusable,
To realize the reusable,you should have the ability to find out the
core of your applications. then make it a lib.
And you should well documented with simple butflexible
programming interface to helps others programmer.
4 Filters,
Filter is just transform. input and output ,to helps combining the programs.
5 Openfileformat
6 Flexibility:
is for the ingeniously users , never assume that user might want to do.
avoid arbitrary limits on field size,numbers limitation
Remember the famous name:AT&T,Linus Torvalds,Helsinki,Richard Stallman on GNU,Dennis Ritchie,
Programming Linux
1 Linux programs: two special typs: executables
and scripts:
these two type can replace each other vice versa.
What the tips I learn form. this charpter:
1 / forward slash ,remember the UNIX got the first, the DOS not.
2 C compiler C89
3 emacs is a important editor in linux
4 ./ what that means
5 the RoadMap actually -- where the tools and development resources arelocated.
ok,這是個入門的重點:那就是知道linux是如何組織和應用各個應用和工具的:預設路徑,這個往往是初學者不知道的東西:
general applications: /usr/bin
administrator specific: /usr/local/bin or
/opt
usr/local will not remove while you reinstall the OS
You need to know the applications /include header files/ and thelibrary
files.
Some very useful flags for:
-I (uppercase letter for "i") used for libs include path
-l (lowercase letter for "L") find a lib's full path and name standard lib path. eg. -lm include a math libs in standard path
-L add search directory , if not specify then it means just in current directory.
how to generate a lib and use
1 use -C while we compile the program:
2 use ar to creat a archive
then chapter said how a shared libraries are works
Getting helps show us the basic help method:
1 man
2 info
3 help eg: used in bash shell:
help set