Linux 常用命令之ls
简单示例
长格式列出
sh-4.2# ls -l
长格式列出并计算大小
sh-4.2# ls -lh
长格式列出,并打印最后访问时间
sh-4.2# ls -lu
长格式列出,并打印最后属性修改时间
sh-4.2# ls -lc
长格式列出,并打印最后内容修改时间
sh-4.2# ls -l
长格式列出,并详细时间打印内容
sh-4.2# ls -l --full-time
列出目录下的所有文件和子目录的详细资料
ls -al -R /root/ # 可以用来替代tree
用ls中列出文件的绝对路径
ls | sed "s|^|`pwd`\/|"
递归列出当前目录下的所有文件(包括隐藏文件)的绝对路径
find $PWD | xargs ls -ld
指定文件时间输出格式
ls -tl --time-style=full-iso
详细参数
心若向阳,无谓悲伤!