我的 find 命令如下所示:
find / -mindepth 1 -type f -path /exclude1 -prune -o -path /exclude2 -prune -o -printf '%p %Cs %s\n'
Run Code Online (Sandbox Code Playgroud)
我得到的结果是例如:
/lost+found 1151063954 16384
/dir/subdir 1483455984 4096
/dir/subdir/file.properties 1440054032 453
Run Code Online (Sandbox Code Playgroud)
现在,我不想再在结果中看到 /dir/subdir 了。我该如何解决?
我需要将 -type f 放在搜索命令的末尾,但在 printf 之前。它变成了:
find / -mindepth 1 -path /exclude1 -prune -o -path /exclude2 -prune -o -type f -printf '%p %Cs %s\n'
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
558 次 |
最近记录: |