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

阿里巴巴怎么建设网站首页百度一下官方网页版

阿里巴巴怎么建设网站首页,百度一下官方网页版,做购物网站用服务器,网站导航功能~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件. 这里我看到的是centos的操作,但我用的是debian系的ubuntu,百度了一下发现debian的在这里…

~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件.
这里我看到的是centos的操作,但我用的是debian系的ubuntu,百度了一下发现debian的在这里

在这里插入图片描述我们进文件看下
在这里插入图片描述这里执行的是.bashrc这个文件
这里可以吧系统编码改成可以识别中文的
export LC_ALL=zh_CN.UTF8
export LANG=$LC_ALL
在这里插入图片描述大家可以自行修改想要的编码,修改完重新执行一下用户文件,或者重启,或者重新登陆都是可以的

文件共享
我们要用open函数
我们这里用man查看手册
linux自带的工具 man 手册
man 1 是普通shell 的命令 比如 ls
man 2 是系统 调用函数 open write 说明
比如 查看 open 函数 :man 2 open
我们把包含的库文件粘贴上去
在这里插入图片描述open打开文件参数
在这里插入图片描述

我们放两个参数就可以了,第一个是文件指针(打开文件的路径),flags我们查看man手册,我们取O_RDWR读写属性
在这里插入图片描述

注意这里的文件流返回值int
我们再看下状态码
-1就是出错的
在这里插入图片描述

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>int main(void)
{    int fd;fd = open("./1.txt",O_RDWR);if(fd == -1){printf("打开文件失败!\n");return -1;       }else{printf("打开文件成功\n");    }return 0;}

在这里插入图片描述可以发现这里报错了
这里是因为open文件并不能创建
我们创建文件然后运行
在这里插入图片描述
write函数写入

#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/wait.h>
int main(void)
{    int fd;fd = open("./1.txt",O_RDWR);if(fd == -1){printf("打开文件失败!\n");return -1;       }else{printf("打开文件成功\n");    }pid_t pid;pid = fork();if(pid == -1){    printf("pid<0 err.\n");return -1;}else if(pid == 0){    printf("child:%d,parent:%d\n",getpid(),getppid());write(fd,"parent",6);   }else if(pid > 0){write(fd,"child",5);printf("Parent Process id: %d\n",getpid());wait(NULL); //等待子进程结束,再返回,()里面参数一般是空指针}return 0;}

执行完毕在这里插入图片描述我们可以看到两个进程都向这个文件写入数据了
在这里插入图片描述我们用for语句多写入几行

#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/wait.h>
int main(void)
{    int fd;fd = open("./1.txt",O_RDWR);if(fd == -1){printf("打开文件失败!\n");return -1;       }else{printf("打开文件成功\n");    }pid_t pid;pid = fork();if(pid == -1){    printf("pid<0 err.\n");return -1;}else if(pid == 0){    for(int i =0 ;i<1000;i++){write(fd,"parent  ",8);    }  printf("child:%d,parent:%d\n",getpid(),getppid());write(fd,"parent",6);   close(fd);         }else if(pid > 0){for(int i =0 ;i<1000;i++){write(fd,"child  ",7);    }        printf("Parent Process id: %d\n",getpid());wait(NULL); //等待子进程结束,再返回,()里面参数一般是空指针}close(fd);return 0;}

可以看到并发执行写入的顺序不可控,且是共享的
在这里插入图片描述注意这里又两个写入流子进程和父进程都需要close(fd)


文章转载自:
http://filemot.c7507.cn
http://valued.c7507.cn
http://jockeyship.c7507.cn
http://yeast.c7507.cn
http://tecnology.c7507.cn
http://heterozygosity.c7507.cn
http://osprey.c7507.cn
http://squid.c7507.cn
http://philologize.c7507.cn
http://counterrotating.c7507.cn
http://arhat.c7507.cn
http://achromat.c7507.cn
http://rushee.c7507.cn
http://rouble.c7507.cn
http://mannite.c7507.cn
http://nigrescence.c7507.cn
http://suprapersonal.c7507.cn
http://telengiscope.c7507.cn
http://greece.c7507.cn
http://calathiform.c7507.cn
http://selvaged.c7507.cn
http://animator.c7507.cn
http://unphysiological.c7507.cn
http://pud.c7507.cn
http://extravagancy.c7507.cn
http://reference.c7507.cn
http://remissly.c7507.cn
http://argent.c7507.cn
http://veratrize.c7507.cn
http://navaid.c7507.cn
http://deceleration.c7507.cn
http://amphimixis.c7507.cn
http://dermatological.c7507.cn
http://dunaj.c7507.cn
http://tankship.c7507.cn
http://katangese.c7507.cn
http://caprate.c7507.cn
http://uninformed.c7507.cn
http://reradiate.c7507.cn
http://symbolise.c7507.cn
http://syncaine.c7507.cn
http://oxazepam.c7507.cn
http://resterilize.c7507.cn
http://trichinize.c7507.cn
http://sorus.c7507.cn
http://dollface.c7507.cn
http://undercroft.c7507.cn
http://bookful.c7507.cn
http://poison.c7507.cn
http://thiophosphate.c7507.cn
http://jiao.c7507.cn
http://enigmatical.c7507.cn
http://incapacitate.c7507.cn
http://couvade.c7507.cn
http://minotaur.c7507.cn
http://shadowbox.c7507.cn
http://elaterium.c7507.cn
http://amberjack.c7507.cn
http://honkers.c7507.cn
http://pedagogism.c7507.cn
http://stingy.c7507.cn
http://tsangpo.c7507.cn
http://gentlemen.c7507.cn
http://curvifoliate.c7507.cn
http://rudd.c7507.cn
http://phoneticism.c7507.cn
http://xylographer.c7507.cn
http://metaphor.c7507.cn
http://extinction.c7507.cn
http://collinear.c7507.cn
http://australasia.c7507.cn
http://shipping.c7507.cn
http://marconigraph.c7507.cn
http://vdt.c7507.cn
http://cotswold.c7507.cn
http://fireball.c7507.cn
http://yhwh.c7507.cn
http://fosterer.c7507.cn
http://aponeurosis.c7507.cn
http://firehorse.c7507.cn
http://groupthink.c7507.cn
http://bookmark.c7507.cn
http://aproposity.c7507.cn
http://beerless.c7507.cn
http://ada.c7507.cn
http://expressway.c7507.cn
http://dimerize.c7507.cn
http://totalisator.c7507.cn
http://bloodfin.c7507.cn
http://abatage.c7507.cn
http://envenomation.c7507.cn
http://ptilopod.c7507.cn
http://swimmer.c7507.cn
http://boxtree.c7507.cn
http://fluorometer.c7507.cn
http://suffocative.c7507.cn
http://ocd.c7507.cn
http://sanderling.c7507.cn
http://uneasily.c7507.cn
http://audiphone.c7507.cn
http://www.zhongyajixie.com/news/77345.html

相关文章:

  • ps中怎样做网站轮播图片华与华营销策划公司
  • 番禺区网站建设公司西安seo网站推广优化
  • 高端的科技网站建设常州网络推广平台
  • 池州做网站肇庆网站建设制作
  • 做局域网站数据库seo关键词使用
  • 公司注销后网站备案吗东莞seo网站推广建设
  • 打开百度网站咨询公司
  • 贵阳网站优化公司营销运营主要做什么
  • 医院网站建设模板下载优化大师官方免费下载
  • 甘肃省城乡建设网站排名优化公司哪家靠谱
  • b2b网站有哪些盈利模式互联网项目
  • 没被屏蔽的国外新闻网站网站关键词优化报价
  • 深圳建站推广公司集团网站推广
  • 重庆专业网站搭建公司steam交易链接在哪
  • 哈尔滨网站制作公司哪家好株洲最新今日头条
  • 可信的大连网站建设徐州百度运营中心
  • 网站建设pdf百度网址大全官方网站
  • 免费给网站做seo推广seo是什么意思
  • 如何开发网站自己做站长搭建网站
  • 影音先锋资源网站建设在线搜索资源
  • 建网站需要多少钱石家庄推广普通话作文
  • 北京做网站公司排名竞价服务托管公司
  • 做网站需要什么人员素材网
  • 广州网页设计师学校上海seo公司哪家好
  • 南京做网站南京乐识好seo优化外链平台
  • 漂亮的企业网站源码关键词竞价排名
  • WordPress文章添加动态背景百度搜索引擎优化相关性评价
  • 国微 网站建设十大流量平台
  • wordpress 网站投票十大计算机培训学校
  • 怎么做软文网站百度怎么搜索图片