linux - 如何使用 -haltr 格式仅显示子目录内的文件?
问题描述
如何将输出外观添加ls -haltr
到下面的命令中?
find 20180913/ -maxdepth 5 -not -type d -and -not -name '.*'
基本上我试图只列出我的子目录中的文件,但需要显示按日期排序的文件时间戳,最新的在底部。
谢谢
解决方案
您可以尝试使用以下exec
选项find
:
find 20180913/ -maxdepth 5 -not -type d -and -not -name '.*' -exec ls -haltr {} +
根据 PesaThe 的更正更新了我的答案。
推荐阅读
- python - Processing.py 草图错误:未闭合的括号/引号
- python - 自动搜索特定excel文件的文件夹并导入pandas
- android - Android QuickBlox SDK 客户端未连接或不再连接
- node.js - .env 文件未定义使用 require('dotenv').config();
- php - 使用 HTMLpurifier 过滤 img 标签的 URL
- android - 图像是手动设计的吗?
- sas - 将 Looker 连接到 SAS
- c# - 如果不同的属性与不同列表中的值匹配,则为列表中的每个对象设置属性
- mysql - 从 Symfony Docker 容器到 MariaDB 容器的 Doctrine Connection 被拒绝
- c - 产生任意数量的子进程?