LinuxCommandLibrary

skicka

Copy files to/from Google Storage

TLDR

Upload a file/folder to Google Drive

$ skicka upload [path/to/local] [path/to/remote]
copy

Download a file/folder from Google Drive
$ skicka download [path/to/remote] [path/to/local]
copy

List files
$ skicka ls [path/to/folder]
copy

Show amount of space used by children folders
$ skicka du [path/to/parent/folder]
copy

Create a folder
$ skicka mkdir [path/to/folder]
copy

Delete a file
$ skicka rm [path/to/file]
copy

SYNOPSIS

skicka [global_options] command [command_options] [arguments]

Common Commands:
skicka ls [options] [path]
skicka upload [options] local_path [remote_path]
skicka download [options] remote_path [local_path]
skicka sync [options] local_dir remote_dir
skicka rm [options] path
skicka mkdir [path]
skicka help [command]

PARAMETERS

-config <path>
    Specifies the path to the configuration file (default: ~/.skicka.config).

-verbose
    Enables verbose output, showing more details about operations.

-version
    Displays the skicka version and exits.

ls -l
    Lists files in long format, showing size, modification time, and ID.

ls -r
    Recursively lists contents of directories.

ls -a
    Includes all files, including those in the trash.

upload -p
    Preserves the modification time of the local file when uploading.

upload -m <MIME_type>
    Forces a specific MIME type for the uploaded file.

upload -r
    Recursively uploads a local directory and its contents.

download -p
    Preserves the modification time of the remote file when downloading.

download -f
    Forces overwrite of local files during download if they already exist.

sync -d
    Performs a dry run, showing what changes would be made without executing them.

sync -u
    Syncs by only uploading new or modified files from local to remote.

sync -D
    Syncs by only downloading new or modified files from remote to local.

sync -t
    When deleting files, move them directly to trash instead of permanent deletion.

DESCRIPTION

skicka is a powerful, command-line utility designed for interacting with Google Drive. Written in Go, it allows users to manage their Google Drive files and folders directly from the terminal, offering capabilities such as uploading, downloading, listing, syncing, and deleting content. It's particularly useful for scripting and automating Google Drive operations on Linux systems where a graphical interface is not available or desired. skicka authenticates using OAuth2, requiring an first-time browser-based authorization step. Unlike FUSE-based solutions, skicka operates by performing discrete file operations, making it suitable for batch processing and integration into shell scripts.

CAVEATS

skicka is a third-party utility and is not typically pre-installed on Linux distributions. Installation requires the Go programming language environment. Authentication relies on Google's OAuth2, which involves an initial browser-based authorization step. It does not provide a FUSE-based mount, meaning files are not directly accessible in the filesystem as if they were local; operations are performed explicitly via skicka commands. Google Drive API rate limits may apply for extensive usage.

INSTALLATION

To install skicka, you need to have the Go programming language installed on your system. Once Go is set up, you can install skicka using the Go command:

go install github.com/google/skicka@latest

This command will download, compile, and install the skicka executable into your Go binary path (e.g., ~/go/bin), which should be in your system's PATH variable.

AUTHENTICATION

The first time you run a skicka command that interacts with Google Drive (e.g., skicka ls), it will prompt you to authenticate. This process involves skicka opening a browser window to Google's OAuth2 authentication page. You will need to sign in with your Google account and grant skicka the necessary permissions. After successful authorization, Google will provide an authentication code that skicka will use to store credentials locally (by default in ~/.skicka.config), allowing subsequent operations without re-authentication.

HISTORY

skicka was developed by Google and is written in Go, Google's open-source programming language. Its development aimed to provide a robust and efficient command-line interface for Google Drive, particularly useful for developers and system administrators needing to integrate Google Drive operations into scripts and automated workflows. Its Go-based implementation ensures good performance and cross-platform compatibility, making it a reliable tool for managing cloud storage from the terminal.

SEE ALSO

rclone(1), gdrive, curl(1), rsync(1)

Copied to clipboard