若要在AWS Ubuntu实例中上传大文件,需检查以下设定:
若上述设定已正确配置,但实例仍无法接受大文件,则可通过以下方式解决:
示例代码:
分割文件:
$ split -b 10m myfile.txt myfile.txt.part
上传文件:
$ scp -i my_keypair.pem myfile.txt.part* ec2-user@my.ec2.instance.com:/home/ec2-user/
合并文件:
$ cat myfile.txt.part* > myfile.txt
$ aws s3 cp /path/to/large-file s3://my-bucket/large-file
$ aws s3 cp s3://my-bucket/large-file /path/to/large-file