![]() ![]() Important - in both cases just the last part of the path name is taken into account. On the other hand to upload just the contents, specify the directory it with a trailing slash: To upload a directory and keep its name on the remote side specify the source without the trailing slash: It all depends on how you specify the source. With directories there is one thing to watch out for – you can either upload the directory and its contents or just the contents. We can also upload a directory with -recursive parameter: ~/demo$ s3cmd put file0-1.msg s3://s3tools-demo/test-upload.msgįile0-1.msg -> s3://s3tools-demo/test-upload.msg Obviously we can for instance upload one of the files to S3 and give it a different name: Let’s have these files in our working directory: The source can be a single file or a directory and there could be multiple sources used in one command. Sync, get and put all support multiple arguments for source files and one argument for destination file or directory (optional in some case of get). This is similar to a unix rsync command, with some exceptions outlined below.įilenames handling rules and some other options are common for both these methods. By default a md5 checksum and file size is compared. Conditional transfer - only files that don’t exist at the destination in the same version are transferred by the s3cmd sync command.This is similar to a standard unix cp command that also copies whatever it’s told to. Unconditional transfer - all matching files are uploaded to S3 ( put operation) or downloaded back from S3 ( get operation). ![]() Program S3cmd can transfer files to and from Amazon S3 in two basic modes:
0 Comments
Leave a Reply. |