• ls


    命令格式:

      ls [OPTION]... [FILE]...

    OPTION:

      -a                     # 列出目录下所有的内容,包括隐藏文件

      --author        # with -l, 可以显示创建文件的原始属主和属组

      -l                     # 以长格式列出详细信息

      -h                     # with -l, print sizes in human readable format (e.g., 1K 234M 2G)

      --si           # likewise, but use powers of 1000 not 1024

      -d                     # 列出指定目录的目录信息

      --full-time            # 时间信息详细显示,例如:2019-04-19 22:21:36.152269504 -0400

      -i                     # print the index number of each file

      -n           # 长格式显示信息时,属主和属组以 uid 和 gid 的形式显示

      -L            #当显示符号链接的文件信息时,显示链接引用而不是链接本身的文件信息

      -p           # 在目录后面追加 /

      -r           # 倒序
      -R           # 递归列出子目录

      -s           # 以块为单位打印每个文件的分配大小
      -S           # sort by file size

      -U           # 不排序;按文件被创建顺序列出条目

      -v           # 文本中(版本)数字的自然排序

      -X           # 按条目扩展名按字母顺序排序

      --sort=WORD      # sort by WORD instead of name: none (-U), size (-S), time (-t),

                  # version (-v), extension (-X)
      --time={ctime|atime}  # with -l, show time as WORD instead of default modification time:

                   # atime or access or use (-u) ctime or status (-c); also use specified

                  # time  as sort key if --sort=time

      -u           # with -lt: sort by, and show, access time; with -l: show access time

                   # and sort by name; otherwise: sort by access time

      -c           # with  -lt:  sort  by,  and show, ctime (time of last modification of

                  # file status information); with -l: show ctime and sort by name;

                  # otherwise: sort by ctime, newest first

      -t           # sort by modification time, newest first

      --time-style={long-iso|iso|+FORMAT}       # +FORMAT 的格式和 date 中的一样

      -I                     # 不列出与 shell PATTERN 匹配的隐含

      --file-type                # 目录后追加 / ,软链接追加 @ ,套接字文件追加 = ,

                            # 可执行文件追加 * ,重定向文件追加 > ,管道文件追加 |

      --color[=WHEN]              # colorize the output; WHEN can be 'never', 'auto', or

                           # 'always' (the default); more info below

      --block-size=SIZE             # 使用指定的块大小显示容量

      -1                     # 一行列出一个条目

    需要注意:

      ls 长格式显示的时间默认为修改时间

  • 相关阅读:
    POJ-2528 Mayor's posters 线段树 离散化
    POJ 3468 A Simple Problem with Integers 线段树区间修改
    CodeForces
    POJ3208 Apocalypse Someday 数位DP经典绝世好题
    CodeForces114 Double Happiness 数论 二次筛法 bitset的应用
    P3146 [USACO16OPEN]248 G 区间DP 暴力DP
    【Python学习】requests短连接
    【Windows学习】免登录和自动登录
    【Linux学习】expect远程下载和上传样例
    【Linux学习】软件包管理-wget,rpm,yum,apt-get
  • 原文地址:https://www.cnblogs.com/xiaosongblog/p/12403687.html
Copyright © 2020-2023  润新知