- 32
- 0
- 约2.09万字
- 约 70页
- 2018-05-06 发布于福建
- 举报
Changing Directories You use the cd (change directory) command to change directories: cd ~—Changes to your home directory cd /tmp—Changes to the directory /tmp On most Linux systems, your prompt will tell you what directory you’re in. If you ever explicitly need to know what directory you’re in, you can use the pwd command to identify the working directory for the current process. commands function cd Changes to your home directory cd ~ Changes to your home directory cd / Changes to root directory cd .. Changes to directory above cd /root Changes to your /root directory cd /home Changes to /home directory Making Directories You can use the mkdir (make directory) command to make directories. mkdir photos—Makes a directory called photos within the current direc mkdir -p this/that/theother—Makes the nested subdirectories named within the current directory. Removing Directories The command rmdir will remove a directory that is empty. Connecting Commands and Redirecting Input and Output Linux provides many small, simple commands that you can combine to perform complex tasks. Linux actually provides two different ways of specifying that the output of one command is the input to another: by using a pipe to connect the two commands by what is known as redirecting IO, which stands for redirecting input/output Pipe connecting the standard output from one command to the standard input of another. The pipe automatically ties the two commands together and sends the output of the first to the second as input. $ ls –al /etc | less $ ls –al /etc | lpr redirecting I/O The output of a file can also be redirected to a file, using the greater than sign (), which simply creates a file containing the output of the command, as in the following example: ls listing.out This command takes the output of the l s command and sends it to the file listing.out. Concatenating Files The command cat (concatenate) displays files to standard output. If you want to view the contents of a short text f
您可能关注的文档
最近下载
- 2025年人教版一年级下册数学教学计划.docx VIP
- 高考语文文言文阅读《白氏长庆集者,太原人白居易之所作》含答案.docx VIP
- 公司治理 赵晶ppt全套教学课件.pptx
- 企业资产分类编号与管理体系标准.doc VIP
- 淋巴瘤性甲状腺肿多学科决策模式中国专家共识(2025版).docx VIP
- 游客接待中心项目投资计划书.docx
- 北师大版三年级下册数学全册教学设计(配2026年春改版教材).docx
- 科学社会主义的创立及其实践(上)——《社会主义发展简史》之二PPT课件.pptx VIP
- (高清版)G-B∕T 31838.4-2019 固体绝缘材料 介电和电阻特性 第4部分:电阻特性(DC方法) 绝缘电阻.pdf VIP
- 四级养老护理员国家职业技能培训四级模块一项目一清洁照护.pptx VIP
原创力文档

文档评论(0)