S4cmd
Learn how to use s4cmd with Filebase.
What is s4cmd?
s4cmd is a python based command-line utility for accessing S3-compatible services. s4cmd is intended as an alternative to s3cmd with enhanced performance for large files and with a number of additional features.
Read below to learn how to use s4cmd with Filebase.
Versions of s4cmd below the 2.1.0 release do not support the --endpoint_url
flag, which is required when using s4cmd with Filebase.
This guide was tested and written using Ubuntu 20.04. Commands may vary based on your operating system and version.
1. Install s4cmd.
apt-get install s4cmd
This guide uses Ubuntu 20.04. This command will vary based on your operating system and version.
2. Configure s4cmd.
s4cmd uses the same credentials file as AWS CLI. If this file has already been configured for use with Filebase on your system, you can skip this step.
If you do not already have a credentials file from AWS CLI configured, follow these steps:
mkdir ~/.aws
Then create and edit the credentials file to contain your access key pair:
vi ~/.aws/credentials
Once configured with credentials, can begin using s4cmd.
List your Filebase buckets
s4cmd --endpoint-url=https://s3.filebase.com ls
Create a bucket
s4cmd --endpoint-url=https://s3.filebase.com mb s3://filebase-sample-bucket
Copy a file up to Filebase
s4cmd --endpoint-url=https://s3.filebase.com cp image.jpg s3://filebase-sample-bucket
Copy a file from Filebase down to the working directory
s4cmd --endpoint-url=https://s3.filebase.com cp s3://filebase-sample-bucket/image.jpg .
For a full list of commands and features, visit the official s4cmd page.
Last updated