码迷,mamicode.com
首页 > 系统相关 > 详细

【Linux笔记(002) 】-- centos7 文档操作基本命令

时间:2017-09-30 15:20:31      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:ice   分享   笔记   9.png   change   文件复制   centos7   es2017   linux笔记   

一、cd -- ChangeDirectory

  a) 切换到 /DemoLM/ 文件夹

技术分享

技术分享

  b) 回到用户 Home 根目录:是哪个账户登录的就会进入哪个用户的根目录

技术分享

二、pwd -- PrintWorkingDirectory

  a) 查看当前工作目录

技术分享

技术分享

三、mkdir -- MakeDirectory

  a) 创建一个 /test/ 目录

技术分享

四、touch -- 

  a) 创建一个 test.txt 文件

技术分享

五、rm -- ReMove

  a) 删除 test.txt 文件

技术分享

  b) 删除 test 文件夹

技术分享

  c) 同时删除 /test2/ 文件与文件夹

技术分享

技术分享

六、cp -- Copy

  a) 将 /test1/ 文件夹下 test1.txt 复制到 /test2/ 文件夹中

技术分享

  b) 将 /test1/ 文件夹及其中的文件复制到 /test2/ 文件夹中

技术分享

  c) 还可以使用通配符执行高级操作

    *:表示所有文件与文件夹

    ?:表示一个字符

七、mv -- Move

  a) 移动 /test2/test1/ 文件夹到 /DemoLM/ 中

技术分享

八、find -- 

  a) 查找 test1.txt 文件

技术分享

  b) 查找以 test 开头的文件

技术分享

  c) 查找当前目录下拥有者为 root 的文件

技术分享

九、cat -- Concatenate

  a) 查看 /etc/services

技术分享

  b) 与 cat 类似的 head / tail 

    查看前十行

技术分享

     查看后十行

技术分享

  c) 与 cat 类似的 more ,一屏一屏显示 /etc/services 

技术分享

  d) cat 命令可重定向输出内容到文本,将 /etc/services 内容输出到 /DemoLM/test.txt 

技术分享

 

 

                                         蒙

                                    2017-09-30 13:39 周五

 

【Linux笔记(002) 】-- centos7 文档操作基本命令

标签:ice   分享   笔记   9.png   change   文件复制   centos7   es2017   linux笔记   

原文地址:http://www.cnblogs.com/Meng-NET/p/7614699.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!