Linux C + + Training
Linux C + + Training
Syllabus
________________________________________
1, Linux Operating System
System Environment: Ubuntu GNU / Linux, RedHat Linux AS5,
FreeBSD
Course Requirements: proficient use of commonly used Linux
/ UNIX commands.
Time: 1 week.
________________________________________
2, Linux C + + development environment to build, develop
the use of tools
Related content: vi, GCC, GDB, Make, CVS, Subversion,
Eclipse CDT
Course requirements:
Skilled use of vi text
editor;
Skilled use of GCC tool chain for compiling, debugging,
build an executable file or shared library / static library;
Skilled preparation of Makefile;
Skilled configuration, using two kinds of CVS and
Subversion version control tool;
Skilled configuration, use the Eclipse CDT development
tools.
Time: 1 week
________________________________________
3, C + + language
C + + is a
multi-paradigm programming language, compared with C, Java, C # language such
as C Department of complex high, but once comprehend the essence of C + +, you
can play a powerful C + + language, the power, in order to enable trainees to
master C + + language programming techniques We
see this part of the program is divided into five parts:
Process-Oriented Programming: Core C + +
Dealing with technology: C + + basics: types and
declarations, pointers and arrays, expressions and statements, functions,
namespaces, exceptions, code files organization
Course requirements: a solid grasp the basic knowledge of
C + +.
Time: 1.5 weeks.
Object-oriented programming: encapsulation, inheritance
and polymorphism (encapsulation, inherit & Polymorphism)
Related to technology: class design, operator overloading,
inheritance and polymorphism.
Course requirements: a
correct understanding of object-oriented concepts, object-oriented way of
thinking and methods of building software, the correct design and use of
clas
Ïà¹ØÎĵµ£º
ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸´æÈ¡È¨ÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓà chmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËù´æÈ¡¡£
mode : ȨÏÞÉ趨×Ö´®£¬¸ñʽÈçÏ : [ugoa...][[+-=][rwxX]...][,...]£¬ÆäÖÐu ±íʾ¸Ãµµ°¸µÄÓµÓÐÕߣ¬g ±íʾÓë¸Ãµµ°¸µÄÓµÓÐÕßÊôÓÚͬһ¸öÈºÌ ......
ÕâÊÇlinuxÖÐÒ»¸ö·Ç³£ÖØÒªÃüÁÇë´ó¼ÒÒ»¶¨ÒªÊìϤ¡£ËüµÄ¹¦ÄÜÊÇΪijһ¸öÎļþ»òĿ¼ÔÚÁíÍâÒ»¸öλÖý¨Á¢Ò»¸öͬ²½µÄÁ´½Ó£¬ÀàËÆWindowsϵij¬¼¶Á´½Ó¡£
Õâ¸öÃüÁî×î³£ÓõIJÎÊýÊÇ-s£¬¾ßÌåÓ÷¨ÊÇ£º
sudo ln -s Ô´Îļþ Ä¿±êÎļþ
µ±ÎÒÃÇÐèÒªÔÚ²»Í¬µÄĿ¼£¬Óõ½ÏàͬµÄÎļþʱ£¬ÎÒÃDz»ÐèÒªÔÚÿһ¸öÐèÒªµÄĿ¼Ï¶¼·ÅÒ»¸ö±ØÐëÏàͬµÄÎļþ£¬ ......
ÎÒ¾ÍÊÇÒ»¸öСÐÂÊÖ+С²ËÄñ£¬ÕýÔÚ·¢·Üѧϰlinux£¬³õÓÐÐĵÃËì¾ö¶¨¼Ç¼ÏÂÀ´£¬Ò²Ðí¶ÔÓÐЩÈËÀ´ËµÎÒдµÄ¶¼Ì«Ç³ÏÔ£¬µ«ÊǶԳõѧÕßÀ´Ëµ¾ø¶ÔÊÇÓÐÓõģ¬¿ÉÒÔÈÃÄãÉÙ×ߺܶàÍä·£¬¿öÇÒÎÒ»áÓÉdzÈëÉîµÄ£¬ÑØ×ÅÎÒµÄ×ã¼£Ò»Æðѧϰ°É£¬¼ÓÓÍ£¡
±¾À´ÏëÏÈдϵͳ°²×°£¬È»ºó»·¾³ÅäÖ㬠......
1¡¢ÏµÍ³Ê±ÖÓ(System Clock)ÓëʵʱʱÖÓ(Real Time Clock)
ʵʱʱÖÓÖ¸µÄÊÇÓ²¼þʱÖÓ£¬¶øÏµÍ³Ê±ÖÓÖ¸µÄÊÇÈí¼þʱÖÓ£¬´æÔÚÓÚLinuxϵͳ֮ÖС£µ±ÏµÍ³Æô¶¯Ê±£¬Linux»á´ÓÓ²¼þ¶Áȡʱ¼ä×öΪϵͳʱ¼ä£¬Ö®ºó±ãÒ»Ö±²ÉÓÃϵͳʱ¼ä¡£LinuxÃüÁîdate¿ÉÒÔÓÃÀ´ÉèÖÃϵͳʱÖÓ£¬¶øhwclock»òÕßclockÔòÓÃÀ´ÉèÖÃʵʱʱÖÓ£¬¼´Ó²¼þʱÖÓ¡£
2¡¢Ê±ÖÓÆµÂÊ
µ¥ ......
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#define MAX 1024
int get_file_count(char *root)
{
DIR *dir;
struct dirent * ptr;
int total = 0;
char path[MAX];
dir = opendir(root ......