我正在尝试从旧的NAS盒(qnap ts209)中删除所有隐藏的mac垃圾邮件文件。我尝试按照以下步骤用bash删除所有Mac生成的文件“ ._”,但NAS上的find命令不包含该-exec
选项。
# [/share/Qweb] # find -name "._*" -exec rm -rf {} \;
Usage: find [PATH...] [EXPRESSION]
Search for files in a directory hierarchy. The default PATH is
the current directory; default EXPRESSION is '-print'
EXPRESSION may consist of:
-follow Dereference symbolic links.
-name PATTERN File name (leading directories removed) matches PATTERN.
-print Print (default and assumed).
-type X Filetype matches X (where X is one of: f,d,l,b,c,...)
-perm PERMS Permissions match any of (+NNN); all of (-NNN);
or exactly (NNN)
-mtime TIME Modified time is greater than (+N); less than (-N);
or exactly (N) days
[/share/Qweb] #
这是关于我的盒子的一些信息:
[/share/Qweb] # man find
-sh: man: command not found
[/share/Qweb] # cat /etc/*-release
cat: /etc/*-release: No such file or directory
[/share/Qweb] # lsb_release
-sh: lsb_release: command not found
[/share/Qweb] # cat /proc/version
Linux version 2.6.12.6-arm1 (root@NasARM4) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #2 Sun Sep 18 02:09:29 CST 2011
[/share/Qweb] # uname -a
Linux QNAP 2.6.12.6-arm1 #2 Sun Sep 18 02:09:29 CST 2011 armv5tejl unknown
[/share/Qweb] # uname -mrs
Linux 2.6.12.6-arm1 armv5tejl
我不知道如何从查找到rm,也许这是可能的,我在SU中寻找不涉及的答案时感到非常困惑-exec
。(编辑:https : -delete
//stackoverflow.com/a/11191868/1238884 建议配管到RM并不是一种选择;该死的,我也没有这种选择.0
xargs
工作,谢谢一群!(也附和,但后来find . -name "._*" -print
确实也。