linux – 以树状格式以修改时间递归列出文件

我正在寻找一个命令来从给定目录递归列出所有文件及其修改时间.如果它能够以树形命令生成的树状格式生成输出也会很好.

注意:我正在运行Red Hat Enterprise Linux Server第5版.

编辑:树命令的选项-D仅打印过去几年的最后修改时间的日期部分,尽管它显示当前年份的时间.在这种情况下,我希望在过去的几年中打印日期.

解决方法

I’m looking for a single command to list all files recursively from a
given directory along with its modified time.

$find /path/to/folder -type f -print0 | xargs -0 ls -l --time-style="+%F %T"

It would also be nice if it can produce output in a tree-like format
as produced by tree command.
In my case,precision upto minutes is enough.

在我的CentOS上,Gentoo,… -D选项已在几分钟内显示:

$tree -D
.
├── [Jul 26 14:41]  LICENSE
├── [Jul 26 14:41]  manifests
│ ├── [Oct 10 16:30]  defines
│ │ └── [Jul 26 14:41]  redis source.pp
│ └── [Jul 26 14:41]  init.pp
├── [Jul 26 14:41]  README
└── [Jul 26 14:41]  templates
    ├── [Jul 26 14:41]  redis.conf.erb
    └── [Jul 26 14:41]  redis-server.erb

3 directories,6 files

相关文章

/etc/sysctl.conf这个目录主要是配置一些系统信息,/etc/sys...
1.作用 useradd或adduser命令用来建立用户帐号和创建用户的起...
它们都是多模式编辑器,不同的是vim 是vi的升级版本,它不仅...
不管是我们在安装软件还是监测软件的使用性能,我们都要随时...
装好Tomcat7后,发现除了本机能访问外界访问不了,岂有此理。...
修改防火墙配置需要修改 /etc/sysconfig/iptables 这个文件,...