您的位置:首页 > 运维架构 > Linux

在Linux文本界面关于列表的相关命令

2018-03-27 08:53 197 查看
 ls -l 以长格式显示文件内容
 例如:[root@ns1 ~]# ls -l lshelp.txt
    -rw-r--r-- 1 root root 7580 3月   7 22:17 lshelp.txt
 备注:文件内容格式:权限文件类型、连接方式数目、文件的所有者(用户)、用户所在的组、文件的
    大小(默认为字节)、时间、名字
 
 ls -a 显示包括隐藏文件在内的所有内容
 例如:[root@ns1 ~]# ls -a
    .                .bash_history  .bashrc      install.log.syslog
    ..               .bash_logout   .cshrc       lshelp.txt
    anaconda-ks.cfg  .bash_profile  install.log  .tcshrc
 ls -lh 显示文件大小
  ls -lh lshelp.txt
 例如:[root@ns1 ~]# ls -lh lshelp.txt
    -rw-r--r-- 1 root root 7.5K 3月   7 22:17 lshelp.txt
  
 ls -ld 显示目录属性
  ls -ld /etc/
 例如:[root@ns1 ~]# ls -ld /etc
    drwxr-xr-x. 107 root root 12288 3月   7 18:44 /etc
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: