如何使用雾编辑 s3 上的文件?
我在 s3 上有一堆文件。我使用 .fog 配置文件设置了雾,这样我就可以启动fog
并获得提示。现在,如果我知道 s3 上的文件路径,如何访问和编辑该文件?
I have a bunch of files on s3. I have fog set up with a .fog config file so I can fire up fog
and get a prompt. Now how do I access and edit a file on s3, if I know its path?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法可能是使用 IRB 或 PRY 获取文件的本地副本,或者编写一个简单的脚本来下载、编辑然后重新上传它。假设您有一个名为 data.txt 的文件。
您可以使用以下脚本初始化与 S3 的连接。
然后使用目录对象在本地文件系统上获取文件的副本。
使用您喜欢的编辑器编辑文件,然后再次将其上传到 S3。
The easiest thing to do is probably to use IRB or PRY to get a local copy of the file, or write a simple script to download, edit and then re-upload it. Assume you have a file named data.txt.
You can use the following script to initialize a connection to S3.
Then use the directory object to get a copy of your file on your local file-system.
Edit the file using your favorite editor and then upload it to S3 again.