在一个目录中,使用find,xargs统计每个文件

・1 分钟阅读

对目录中的每个文件进行统计

find . -maxdepth 1 -type f | xargs stat
示例输出
 File: `./index.html'
 Size: 7850 Blocks: 16 IO Block: 4096 regular file
Device: 811h/2065d Inode: 217432085 Links: 1
Access: (0644/-rw-r--r--) Uid: (3801789/ asolkar) Gid: (564674/pg2118692)
Access: 2009-04-16 23:34:23.000000000 -0700
Modify: 2009-06-11 00:33:59.000000000 -0700
Change: 2009-06-11 00:33:59.000000000 -0700
 File: `./favicon.ico'
 Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 811h/2065d Inode: 217432116 Links: 1
Access: (0644/-rw-r--r--) Uid: (3801789/ asolkar) Gid: (564674/pg2118692)
Access: 2009-06-06 07:25:26.000000000 -0700
Modify: 2009-06-06 07:25:26.000000000 -0700
Change: 2009-06-06 07:25:26.000000000 -0700
讨论
Hujiuxiang profile image