• 001_Linux常用命令之ls命令


    1. 认识Linux系统目录结构
    /bin					可执行文件所在目录
    /media					挂载设备媒体,u盘,光驱等
    /mnt 					该目录主要是为了让用户挂在别的文件系统(挂在自己的u盘)
    /usr					unix system resources,庞大和复杂的目录,很多应用会安装到此目录(/usr/local-用户自己安装软件的目录)
    /sbin					超级管理员root的可执行文件目录
    /proc  					此目录是系统内存的映射,会保留进程运行的一些信息
    /etc					系统软件的启动和配置目录
    /dev					设备文件所在目录
    /home/user				用户家目录
    
    2.ls命令常规用法
    • ls(list)查看文件信息
    • ls -l显示详细信息
    root@ubuntu:/usr# ls -l
    总用量 128
    drwxr-xr-x   2 root root 69632 8月   4  2016 bin
    drwxr-xr-x   2 root root  4096 4月  21  2016 games
    drwxr-xr-x  75 root root  4096 8月   4  2016 include
    drwxr-xr-x 145 root root  4096 8月   4  2016 lib
    drwxr-xr-x   3 root root  4096 8月   4  2016 lib32
    drwxr-xr-x   3 root root  4096 8月   4  2016 libx32
    drwxr-xr-x  11 root root  4096 8月   4  2016 local
    drwxr-xr-x   3 root root  4096 4月  21  2016 locale
    drwxr-xr-x   2 root root 12288 8月   4  2016 sbin
    drwxr-xr-x 320 root root 12288 8月   4  2016 share
    drwxr-xr-x   8 root root  4096 7月  30  2016 src
    
    • ls -a显示隐藏的文件或目录
    root@ubuntu:/usr# ls -a
    .  ..  bin  games  include  lib  lib32  libx32  local  locale  sbin  share  src
    
    • ls -R递归显示子目录的内容
    root@ubuntu:/usr# ls -R
    
    • ls -lrt按照时间顺序
    root@ubuntu:/usr# ls -lrt
    总用量 128
    drwxr-xr-x   2 root root  4096 4月  21  2016 games
    drwxr-xr-x   3 root root  4096 4月  21  2016 locale
    drwxr-xr-x   8 root root  4096 7月  30  2016 src
    drwxr-xr-x  11 root root  4096 8月   4  2016 local
    drwxr-xr-x 320 root root 12288 8月   4  2016 share
    drwxr-xr-x   3 root root  4096 8月   4  2016 lib32
    drwxr-xr-x   3 root root  4096 8月   4  2016 libx32
    drwxr-xr-x  75 root root  4096 8月   4  2016 include
    drwxr-xr-x 145 root root  4096 8月   4  2016 lib
    drwxr-xr-x   2 root root 12288 8月   4  2016 sbin
    drwxr-xr-x   2 root root 69632 8月   4  2016 bin
    
    ls      *.c(注释:*代表任意多个字符)
    ls      func.?(注释:?代表任意一个字符)
    
    3.认识路径

    以“/”开头的路径为绝对路径,也就是无论你在哪里,只要输入绝对路径,我们都可以到达
    那么不是"/"开头的路径为相对路径

  • 相关阅读:
    selenium--启动不同的浏览器
    selenium--文件下载
    selenium--常用的获取元素属性
    Python读取yaml文件
    python读Excel方法(xlrd)
    Python--unittest框架
    Python--os模块
    git fork后提交pull request到原作者,别人的pull request我们要怎样merge融合
    GitHub fork的使用
    4.Factory Pattern(工厂模式)
  • 原文地址:https://www.cnblogs.com/LittleFishC/p/13205724.html
Copyright © 2020-2023  润新知