我有一个文件系统,看起来像这样,文件类型未知。
└── 63206
└── 4443606
├── 6433
├── 712861
├── 726355
└── 723714
对于每个文件,我都可以做file <filename>
并得到有关其尺寸的规格。
6433: PNG image data, 138 x 209, 8-bit/color RGBA, non-interlaced
有人可以告诉我如何递归地传送它,以便为bash中的每个文件路径获得类似的输出吗?
我尝试了类似的东西find | file
。我不熟悉管道bash的晚餐。
您可能要添加其他条件,但基本上是从顶层目录开始
find -type f -exec file {} \;
要么
find path_to_dir -type f -exec file {} \;
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句