s3.cmds: Run S3 commands from R.

Description Usage Arguments Value Author(s) References Examples

Description

Run most of the commands available in s3cmd.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
s3.mb(bucket, bucket.location = "US", verbose = FALSE,
      debug = FALSE, access.key='', secret.key='')

s3.rb(bucket, recursive = FALSE, force = FALSE,
      bucket.location = "US", verbose = FALSE, debug = FALSE,
      access.key='', secret.key='')

s3.ls(bucket = NULL, bucket.location = "US",
      human.readable.sizes = TRUE,
      list.md5 = FALSE, verbose = FALSE, debug = FALSE,
      echo = FALSE, access.key='', secret.key='')

s3.la(bucket.location = "US", human.readable.sizes = TRUE,
      list.md5 = FALSE, verbose = FALSE, debug = FALSE, 
      access.key='', secret.key='')

s3.put(x, bucket, bucket.location = "US", verbose = FALSE,
       debug = FALSE, encrypt = FALSE, access.key='', 
       secret.key='')

s3.put.file(file, bucket, bucket.location="US", verbose=FALSE,
       debug=FALSE,encrypt=FALSE, access.key='', secret.key='')

s3.get(bucket, bucket.location = "US", verbose = FALSE,
       debug = FALSE, access.key='', secret.key='',unserialize=TRUE)

s3.del(bucket, bucket.location = "US",
       human.readable.sizes = TRUE,list.md5 = FALSE,
       verbose = FALSE, debug = FALSE, access.key='', 
       secret.key='')

s3.info(bucket, bucket.location = "US",
        human.readable.sizes = TRUE, list.md5 = FALSE,
        verbose = FALSE, debug = FALSE, access.key='', 
        secret.key='')

s3.du(bucket, bucket.location = "US",
      human.readable.sizes = TRUE, list.md5 = FALSE,
      verbose = FALSE, debug = FALSE, access.key='', 
      secret.key='')

Arguments

x

an R object to upload.

file

a file to upload.

bucket

S3 bucket

bucket.location

Specify datacentre where to create the bucket. Possible values are US (default) or EU.

human.readable.sizes

Print sizes in human readable form.

list.md5

Include MD5 sums in bucket listings (only for ls command).

verbose

Enable verbose output.

debug

Enable debug output.

recursive

Recursive upload, download or removal. When used with del it can remove all the files in a bucket.

force

Force overwrite and other dangerous operations. Can be used to remove a non-empty buckets with s3cmd rb –force s3://bkt

encrypt

Use GPG encryption to protect stored objects from unauthorized access. See http://s3tools.org/s3cmd-public for details aboutencryption.

echo

if TRUE echo command before executing.

access.key

Specify an AWS access key to perform this operation. If not set, s3cmd will lookup for a file name .s3cfg in your home folder

secret.key

Specify an AWS secret key to perform this operation. If not set, s3cmd will lookup for a file name .s3cfg in yourhome folder

unserialize

whether the s3 object needs to be deserialized

Value

Return value depends on command used. with the exception of get, most commands return as text the reply from the call to the underlying s3cmd.

Author(s)

Whit Armstrong, with contributions from Paulo Miguel Almeida Rodenas

References

http://s3tools.org/s3cmd

Examples

1
2
3
4
5
6
7
## Not run: 
x <- rnorm(100)
s3.put(x,"s3://prod/my.rands.rds")
x.s3 <- s3.get("s3://prod/my.rands.rds")
stopifnot(all.equal(x,x.s3))

## End(Not run)

armstrtw/Rs3cmd documentation built on May 10, 2019, 1:42 p.m.