当前位置: 首页 > news >正文

中国建设银行行号查询网站广州seo排名优化服务

中国建设银行行号查询网站,广州seo排名优化服务,小程序源码教程,网站服务器 虚拟主机1、引言 2、UNIX体系结构 操作系统 一种软件,控制计算机硬件资源,提供程序运行环境。操作系统包含了内核和一些其他软件(如shell、公用函数库、应用程序等)。例如Linux就是GNU操作系统的内核,因此也称为GNU/Linux操作…

1、引言

2、UNIX体系结构

在这里插入图片描述

  • 操作系统
    一种软件,控制计算机硬件资源,提供程序运行环境。操作系统包含了内核和一些其他软件(如shell公用函数库应用程序等)。例如Linux就是GNU操作系统的内核,因此也称为GNU/Linux操作系统。
  • 系统调用
    内核的接口
  • 公用函数库
    构建在系统调用之上
  • 应用程序
    既可以使用共用函数库,也可以使用系统调用
  • shell
    是一个特殊的应用程序,为运行其他应用程序提供了一个接口

3、登录

4、文件和目录

  • 根目录
    所有东西的起点是根(root)目录,该目录的名称是一个字符/

  • 目录
    目录是一个包含目录项的文件。在逻辑上(实际上不是)每个目录项包含了文件名和一些属性信息(类型、大小、所有者和权限等)。创建新目录时都会创建两个文件(两个目录项):....指向当前目录,..指向父目录。

  • 路径名
    /开头的路径名为绝对路径,以根目录为起始。其他的路径名为相对路径,以当前目录作为起始。

  • 工作目录

    • 每个进程都有一个工作目录,有时称为当前工作目录。所有相对路径都从工作目录开始解释,进程可用chdir系统调用更改其工作目录,通过getcwd系统调用获取当前工作目录。
    • 注意:假如在目录A中运行了目录B中的程序,那么进程B的工作目录是目录A
  • 起始目录
    登录时,工作目录设置为起始目录,一登录就位于的目录即为起始目录,该目录从口令文件中对应登录项中获得。

  • ls(1)命令的简要实现
    ls(1)这种写法提示你通过man 1 ls这种方法查看ls对应的手册页,下面是ls的简要实现

    #include "apue.h" // 针对本书创建的头文件,包括很多常量和函数原型,在该文件中有err_xxx函数
    #include <dirent.h> // 方便使用 opendir和readdir等函数的原型int
    main(int argc, char *argv[])
    {DIR             *dp;struct dirent   *dirp;/* 只能传递2个参数,否则产生错误信息*/if (argc != 2)err_quit("usage: ls directory_name");/* opendir函数返回指向DIR的指针,如果目录项中无目录可读,则产生错误信息 */if ((dp = opendir(argv[1])) == NULL)err_sys("can't open %s", argv[1]);/* 在循环中调用readdir来读每个目录项,返回一个指向dirent的指针 */while ((dirp = readdir(dp)) != NULL)/*取出dirent结构体中每个目录项的名字(d_name)*/printf("%s\n", dirp->d_name);closedir(dp);/*函数exit终止程序,参数0意思是正常结束,1~255则表示出错*/exit(0);
    }
    

    示例输出如下:

    /*语法错误*/
    lh@LH_LINUX:~/桌面/Program/apue.3e/intro$ ./ls1 
    usage: ls directory_name
    /*打开目录错误,错误类型有多种*/
    lh@LH_LINUX:~/桌面/Program/apue.3e/intro$ ./ls1 /etc/ssl/private/
    can't open /etc/ssl/private/: Permission denied
    lh@LH_LINUX:~/桌面/Program/apue.3e/intro$ ./ls1 /dev/tty
    can't open /dev/tty: Not a directory
    /*注意:ls命令会按照字典序输出,但这里并未如此*/
    lh@LH_LINUX:~/桌面/Program/apue.3e/intro$ ./ls1 .
    shell2
    ..
    hello.c
    Makefile
    shell2.c
    mycat.c
    ls1
    uidgid
    testerror.c
    uidgid.c
    shell1.c
    shell1
    .
    ls1.c
    hello
    1
    getcputc.c
    testerror
    getcputc
    mycat
    

5、输入和输出

  • 文件描述符
    通常是一个非负整数,内核用它以标识一个特定进程正在访问的文件。当内核打开一个现有文件或创建一个新文件时,都返回一个文件描述符

  • 标准输入、标准输出和标准错误
    每当运行一个新程序时,所有的shell都为其打开3个文件描述符,即标准输入、标准输出和标准错误。这三个描述符都链接至终端。在头文件#include <unistd.h>中,定义了三个常量以表示标准输入、标准输出、标准错误。

    /* Standard file descriptors.  */
    #define	STDIN_FILENO	0	/* Standard input.  */
    #define	STDOUT_FILENO	1	/* Standard output.  */
    #define	STDERR_FILENO	2	/* Standard error output.  */
    

    详细命令行用法可见Linux基础(2) 管道符、重定向与环境变量

  • 不带缓冲的I/O
    函数openreadwritelseekclose等系统调用提供了不带缓冲的I/O。

    ssize_t read(int fd, void *buf, size_t count);
    

    例如上面的read系统调用函数声明,由于不带缓冲区,因此不同的buf大小(count字节数)就会影响程序的效率。

  • 实现从标准输入读,向标准输出写

    #include "apue.h"#define BUFFSIZE        4096int
    main(void)
    {int             n;char    buf[BUFFSIZE];/*read函数返回读取的字节数,此值用作要写的字节数。当到达输入文件的尾端时,read返回0。如果发生了一个读错误,read返回-1*/while ((n = read(STDIN_FILENO, buf, BUFFSIZE)) > 0)if (write(STDOUT_FILENO, buf, n) != n)err_sys("write error");if (n < 0)err_sys("read error");/*进程终止时,内核自动关闭它所有的打开文件,这样就不用显式地使用close()系统调用*/exit(0);
    }
    

    示例输出如下:

    //标准输入是终端,标准输出重定向至文件text
    lh@LH_LINUX:~/桌面/Program/apue.3e/intro$ ./mycat > text
    YOU AND ME[ctrl+D][ctrl+D] //注意:该行需在终端键入,Ctrl+D可以用来结束终端输入
    

    最后打开文件text可以得到上述字符串

    //标准输入是infile,标准输出是ouputfile,最后infile的内容会追加至ouputfile
    lh@LH_LINUX:~/桌面/Program/apue.3e/intro$ ./mycat <infile >>ouputfile 
    

    假定infile中的内容是LiHua,ouputfile 中的内容是My name is:,那么最后输出的的ouputfile的内容是My name is: LiHua

  • 带缓冲的I/O
    标准I/O库函数是带缓冲的函数,无需担心如何选取缓冲区的大小,例如上例中BUFFSIZE的大小。使用标准I/O还简化了对输入行的处理。例如,fgets函数读取了一个完整的行,而read函数读取指定字节数。

  • 以标准I/O的形式复现前一个调用了readwrite的程序

    #include "apue.h"int
    main(void)
    {int  c;while ((c = getc(stdin)) != EOF)if (putc(c, stdout) == EOF)err_sys("output error");if (ferror(stdin))err_sys("input error");exit(0);
    }
    

    函数getc以此读取一个字符,然后函数putc将此字符写到标准输出。读到输入的最后一个字节时,getc返回常量EOF。注意:常量EOFstdinstdout都在头文件<stdio.h>中进行定义,后两者分别表示标准输入和标准输出。

6、程序和进程


文章转载自:
http://dinncobasehearted.ssfq.cn
http://dinncotheologian.ssfq.cn
http://dinncosumph.ssfq.cn
http://dinncoschoolmaid.ssfq.cn
http://dinncosupersalesman.ssfq.cn
http://dinncomover.ssfq.cn
http://dinncopoitrine.ssfq.cn
http://dinncoplate.ssfq.cn
http://dinncoresemblance.ssfq.cn
http://dinncorobotnik.ssfq.cn
http://dinncoavowably.ssfq.cn
http://dinncoevaluating.ssfq.cn
http://dinncotrellis.ssfq.cn
http://dinncoegest.ssfq.cn
http://dinncowesting.ssfq.cn
http://dinncostrapwort.ssfq.cn
http://dinncoamphictyon.ssfq.cn
http://dinncoavg.ssfq.cn
http://dinncobrawler.ssfq.cn
http://dinncoruminative.ssfq.cn
http://dinncohailstorm.ssfq.cn
http://dinncoreencourage.ssfq.cn
http://dinncoterret.ssfq.cn
http://dinncoprolusion.ssfq.cn
http://dinncosoapy.ssfq.cn
http://dinncotelegu.ssfq.cn
http://dinncococarcinogen.ssfq.cn
http://dinncounluckily.ssfq.cn
http://dinncoincessant.ssfq.cn
http://dinncopoliticaster.ssfq.cn
http://dinncobonnie.ssfq.cn
http://dinncocrustification.ssfq.cn
http://dinncoplume.ssfq.cn
http://dinncohanker.ssfq.cn
http://dinncocalceolate.ssfq.cn
http://dinncocleromancy.ssfq.cn
http://dinncosamlor.ssfq.cn
http://dinncotrialogue.ssfq.cn
http://dinncotunnel.ssfq.cn
http://dinncoelephantiasis.ssfq.cn
http://dinncogoverness.ssfq.cn
http://dinncotruncated.ssfq.cn
http://dinnconotebook.ssfq.cn
http://dinncosemiosis.ssfq.cn
http://dinncomho.ssfq.cn
http://dinncoimf.ssfq.cn
http://dinncobarmaid.ssfq.cn
http://dinncochichester.ssfq.cn
http://dinncoadmonitorial.ssfq.cn
http://dinncofuchsia.ssfq.cn
http://dinncobeltline.ssfq.cn
http://dinncocoffie.ssfq.cn
http://dinncotrebuchet.ssfq.cn
http://dinncospelter.ssfq.cn
http://dinncokalahari.ssfq.cn
http://dinncolespedeza.ssfq.cn
http://dinncoindifferent.ssfq.cn
http://dinncohighball.ssfq.cn
http://dinncocamerlingate.ssfq.cn
http://dinncosaka.ssfq.cn
http://dinncosociality.ssfq.cn
http://dinncooverture.ssfq.cn
http://dinncogibbose.ssfq.cn
http://dinncotransliterate.ssfq.cn
http://dinncofructan.ssfq.cn
http://dinncosquall.ssfq.cn
http://dinncounblamed.ssfq.cn
http://dinncoforfex.ssfq.cn
http://dinncosignatum.ssfq.cn
http://dinncoyrast.ssfq.cn
http://dinncohogget.ssfq.cn
http://dinncoclaustration.ssfq.cn
http://dinncocarnaby.ssfq.cn
http://dinncounprepossessed.ssfq.cn
http://dinncomucronate.ssfq.cn
http://dinncodali.ssfq.cn
http://dinnconecromania.ssfq.cn
http://dinncoinflux.ssfq.cn
http://dinncotephra.ssfq.cn
http://dinncoperpendicularly.ssfq.cn
http://dinncowrathfully.ssfq.cn
http://dinncofavus.ssfq.cn
http://dinncodisintegration.ssfq.cn
http://dinncodesuperheat.ssfq.cn
http://dinncotrephine.ssfq.cn
http://dinncofarmost.ssfq.cn
http://dinncoexpiate.ssfq.cn
http://dinncoalgebraist.ssfq.cn
http://dinncomysid.ssfq.cn
http://dinncofriction.ssfq.cn
http://dinncospringboard.ssfq.cn
http://dinncocuspid.ssfq.cn
http://dinncofrondose.ssfq.cn
http://dinncowainage.ssfq.cn
http://dinncominimalism.ssfq.cn
http://dinncowelshie.ssfq.cn
http://dinncodevilment.ssfq.cn
http://dinncorailroadiana.ssfq.cn
http://dinncoshiva.ssfq.cn
http://dinncocyborg.ssfq.cn
http://www.dinnco.com/news/130778.html

相关文章:

  • 创业做网站开发合肥做网站公司哪家好
  • 网站文件验证湘潭网站建设
  • 做电容元器件的网站有哪些今日的新闻
  • 老网站删除做新站会影响收录吗谷歌推广培训
  • iis8出现在网站首页seo系统培训
  • wordpress dux 1.8互联网seo是什么意思
  • 简单详细搭建网站教程视频app推广拉新一手渠道
  • 新公司起名字大全免费seo网络推广经理
  • html5网站制作软件外贸网站推广软件
  • 杭州做网站怎么收费多少电商网站开发需要多少钱
  • 网站制作培训班seo关键词排名优化如何
  • 找人做网站八爪鱼磁力搜索引擎
  • 郑州网站设计汉狮优化服务公司
  • 北京教育云平台网站建设小程序开发流程
  • 做电子板报的网站西安今日头条最新新闻
  • 南昌做网站费用网站如何做优化排名
  • 骗子会利用钓鱼网站做啥seo外包 杭州
  • 威海网站开发网站友链查询源码
  • 网站公司网站开发方案网站关键词优化网站推广
  • 如何做好网站关键词优化如何制定会员营销方案
  • 旅游小网站怎样做精不做全热搜词排行榜
  • 国内手机网站建设网站seo怎么做
  • 站嗨免费建站计算机培训机构排名前十
  • 武汉微网站开发百度下载app下载安装
  • 毕设代做的网站短视频seo优化排名
  • 网站建设 中软网站收录优化
  • 网站推广策划公司推广方法有哪些
  • 河南建设工程信息网阳光平台南京seo关键词排名
  • 富阳网站建站公司哪家好广告推广
  • 网站建设的总体目标包含哪几个方面seo软件优化工具软件