我试图找到所有冲突文件并通过命令删除它们:
find ./ -iname *Air* | xargs -0 rm
但它显示错误“:文件名太长” 我怎么能解决它?
.//sandbox/CDF.files/._image002 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).jpg
.//sandbox/CDF.files/._image003 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).jpg
.//sandbox/CDF.files/._image004 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).gif
.//sandbox/CDF.files/._image005 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).gif
.//sandbox/CDF.files/._item0001 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/CDF.files/._props002 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/CDF.files/._themedata (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).thmx
.//sandbox/docs/._123CDF (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._1CDF (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).html
.//sandbox/docs/._78CDF (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._8131CDF (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._8173CDF (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._All (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._FULL_CDF (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._LITTLE_CDF (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._Simple (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).doc
.//sandbox/docs/._Simple (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._simpleCH7_fullCH8 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).doc
.//sandbox/docs/._simpleCH7_fullCH8 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/._URL_Command_List_for_All_Series (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).doc
.//sandbox/docs/._URL_Command_List_for_IP8173H_VVTK (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).doc
.//sandbox/docs/8173CDF.files/._colorschememapping (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/docs/8173CDF.files/._editdata (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).mso
.//sandbox/docs/8173CDF.files/._filelist (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/docs/8173CDF.files/._header (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/8173CDF.files/._image001 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).gif
.//sandbox/docs/8173CDF.files/._image002 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).jpg
.//sandbox/docs/8173CDF.files/._image003 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).jpg
.//sandbox/docs/8173CDF.files/._themedata (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).thmx
.//sandbox/docs/All.files/._colorschememapping (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/docs/All.files/._filelist (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/docs/All.files/._header (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).htm
.//sandbox/docs/All.files/._image001 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).gif
.//sandbox/docs/All.files/._image002 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).jpg
.//sandbox/docs/All.files/._image003 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).jpg
.//sandbox/docs/All.files/._image004 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).gif
.//sandbox/docs/All.files/._image005 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).gif
.//sandbox/docs/All.files/._item0012 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/docs/All.files/._props013 (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).xml
.//sandbox/docs/All.files/._themedata (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).thmx
.//sandbox/v1_no_jumna_sorting/._cdf (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).txt
.//sandbox/v1_no_jumna_sorting/._fussy_cdf (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).txt
.//sandbox/v1_no_jumna_sorting/._word (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).txt
.//sandbox/v2_fuzzy_sorting_without_human/._cdf (Hsu-Wei-Chengteki-MacBook-Air 的冲突副本 2013-08-19).txt
: File name too long
答案 0 :(得分:2)
告诉xargs
传递更少的字符。
... | xargs ... -s 4096 ...
或告诉find
删除它们。
find ... -delete
答案 1 :(得分:0)
brew install coreutils
find ./ -iname *Air* | xargs -0 grm
# and you will see the reason
或
find ./ -iname *Air* -delete
# without nothing output