linux磁盘空间异常,linux磁盘空间不足--day31

2019-05-13

8a6028f03bf1?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

第三十一天.png

错误提示

(1)argument last too long

参数列表太长

模拟环境1

创建大量文件

mkdir test

touch test/{1..4000000}.txt

报错

argument last too long

原因

参数列表太长

解决

echo test/{1..4000000}.txt|xargs touch

改变创建大量文件方式

模拟环境2

删除大量文件

ls test/* |xargs rm

报错

argument list too long

原因

参数列表太长

解决

find test/ -type f |xargs rm -fr

环境模拟

(2)cannot allocate memory

无法分配内存

模拟环境1

[echo {1..500000000}.txt

模拟环境2

touch {1..500000000}.txt

环境试验

[root 19:25 @ GYJ ~]# echo {1..500000000}.txt

-bash: xmalloc: cannot allocate 4000000008 bytes (1216512 bytes allocated)

Connection closed by foreign host.

Disconnected from remote host(遇见) at 19:25:26.

Type `help' to learn how to use Xshell prompt.

[c:\~]$

[root 19:27 @ GYJ ~]# touch {1..500000000}.txt

-bash: xmalloc: cannot allocate 4000000008 bytes (1216512 bytes allocated)

Connection closed by foreign host.

Disconnected from remote host(遇见) at 19:28:57.

Type `help' to learn how to use Xshell prompt.

[c:\~]$

直接卡出去

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值