|
系统命令因目录太大无法执行的报错信息
$ rm -rf backup_20121130
rm: cannot read backup_20121130
$ cd backup_20121130
$ find . | head
find: cannot open .
$ ls
ls: .: Value too large to be stored in data type
谢谢7#的xiao8577034,新增尝试使用FTP登录显示的报错如下:
ftp> cd /gpfsjk1/xxx/20130123/backup_20121130
250 CWD command successful.
ftp> ls
200 PORT command successful.
550 No files found.
ftp> dir
200 PORT command successful.
150 Opening data connection for /bin/ls.
total 0
226 Transfer complete.
ftp> rmdir backup_20121130
550 backup_20121130: Do not specify an existing file.
ftp> rmdir ./backup_20121130
550 ./backup_20121130: Do not specify an existing file.
ftp> dir
200 PORT command successful.
150 Opening data connection for /bin/ls.
total 4599408
drwxrwxrwx 2 devis devis 2354896896 Mar 09 22:02 backup_20121130
解决方案:
如果有大量文件数需要删除,可以考虑用 xargs 的 -n 参数进行批量删除.
参考示例:
find /backup/ -ctime 2 -print | xargs -n 10 rm {} \;
find ./ -name "*.req" |xargs -n 100 rm {} \; |
|