【发布时间】:2014-11-04 05:08:45
【问题描述】:
【问题讨论】:
【问题讨论】:
按照该帖子中的建议使用find,并用! 否定-name 条件以反之:
find . -type f ! -name "*.txt"
# ^^^^^^^ ^^^^^^^^^^^^^^^
# just files |
# file names not ending with .txt
【讨论】:
-type f 才能仅查找文件。我终于在 find 联机帮助页中查找了not - exclude 和 inverse 不存在:P
-type f。但是,这个解决方案对你有用吗!?
这对你有用吗?,
ls -lr | grep -E -v "*.txt$"
我最终测试了它并且它有效,-E 扩展 grep
【讨论】: