gpt4 book ai didi

linux - 如何使用 MobaXTerm 便携版查找空目录

转载 作者:太空狗 更新时间:2023-10-29 11:18:21 31 4
gpt4 key购买 nike

我已经阅读了很多主题,只是下面的代码

find . -type d -empty

但在我的 MobaXterm 可移植 BusyBox 上显示了下面的消息我已阅读这篇文章,但不知道该怎么做。

我也检查了 MobaXTerm 插件,但仍然不知道如何在 MobaXTerm 便携版上使用它们。

    find /drives/d/ -type d -empty
find: unrecognized: -empty
BusyBox v1.22.1 (2014-09-26 07:33:17 CEST) multi-call binary.

Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS]

Search for files and perform actions on them.
First failed action stops processing of current file.
Defaults: PATH is current directory, action is '-print'

-L,-follow Follow symlinks
-H ...on command line only
-xdev Don't descend directories on other filesystems
-maxdepth N Descend at most N levels. -maxdepth 0 applies
actions to command line arguments only
-mindepth N Don't act on first N levels
-depth Act on directory *after* traversing it

Actions:
( ACTIONS ) Group actions for -o / -a
! ACT Invert ACT's success/failure
ACT1 [-a] ACT2 If ACT1 fails, stop, else do ACT2
ACT1 -o ACT2 If ACT1 succeeds, stop, else do ACT2
Note: -a has higher priority than -o
-name PATTERN Match file name (w/o directory name) to PATTERN
-iname PATTERN Case insensitive -name
-path PATTERN Match path to PATTERN
-ipath PATTERN Case insensitive -path
-regex PATTERN Match path to regex PATTERN
-type X File type is X (one of: f,d,l,b,c,...)
-perm MASK At least one mask bit (+MASK), all bits (-MASK),
or exactly MASK bits are set in file's mode
-mtime DAYS mtime is greater than (+N), less than (-N),
or exactly N days in the past
-mmin MINS mtime is greater than (+N), less than (-N),
or exactly N minutes in the past
-newer FILE mtime is more recent than FILE's
-inum N File has inode number N
-user NAME/ID File is owned by given user
-group NAME/ID File is owned by given group
-size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))
+/-N: file size is bigger/smaller than N
-links N Number of links is greater than (+N), less than (-N),
or exactly N
-prune If current file is directory, don't descend into it
If none of the following actions is specified, -print is assumed
-print Print file name
-print0 Print file name, NUL terminated
-exec CMD ARG ; Run CMD with all instances of {} replaced by
file name. Fails if CMD exits with nonzero
-delete Delete current file/directory. Turns on -depth option

最佳答案

您正在使用 find from busy-box,它因多个选项存在问题而闻名。

虽然帮助说明它们可用。

我建议使用 findutils 中的 find GNU package如果可能的话。

关于linux - 如何使用 MobaXTerm 便携版查找空目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32627216/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com