zoukankan      html  css  js  c++  java
  • ls 查看文件、目录属性linux 时空

    ls:列出目录内容(默认的就是当前工作目录了)

    格式:命令 [选项] [参数]

    选项:

    -a:列出所有文件、目录(包含隐藏文件、目录)

    -l:以长格式的方式列出

    -d:仅列出目录本身

    -h:配合-l选项使用,以友好的方式,显示文件的大小(若不加-h,默认文件大小是以byte来显示);

    实例:

    [root@uni test]# ls
    dir  file  file1
    [root@uni test]# ls -l
    总用量 10248
    drwxr-xr-x 2 root root     4096 7月  16 15:30 dir
    -rw-r--r-- 1 root root        7 7月  16 15:30 file
    -rw-r--r-- 1 root root 10485760 7月  16 15:32 file1
    [root@uni test]# ls -lh
    总用量 11M
    drwxr-xr-x 2 root root 4.0K 7月  16 15:30 dir
    -rw-r--r-- 1 root root    7 7月  16 15:30 file
    -rw-r--r-- 1 root root  10M 7月  16 15:32 file1
    [root@uni test]# ls -alh
    总用量 11M
    drwxr-xr-x  3 root root 4.0K 7月  16 15:32 .
    drwxr-xr-x. 3 root root 4.0K 7月  16 14:04 ..
    drwxr-xr-x  2 root root 4.0K 7月  16 15:30 dir
    -rw-r--r--  1 root root    7 7月  16 15:30 file
    -rw-r--r--  1 root root  10M 7月  16 15:32 file1
    [root@uni test]# ls -ldh
    drwxr-xr-x 3 root root 4.0K 7月  16 15:32 .

  • 相关阅读:
    shell 案例
    linux 软链接和硬链接区别
    mac安装使用nginx
    Leetcode SQL_#176_第二高的薪水
    南邮ctf web题记录(上)
    CTFHub Web技能树
    XCTF web 新手练习区
    诊断工具--arthas使用教程
    prometheus--监控工具
    无状态状态机--cola stateMachine
  • 原文地址:https://www.cnblogs.com/luniverseg/p/7190814.html
Copyright © 2011-2022 走看看