How to Get rclone stdout to Go Beyond 80 Columns

What is the problem you are having with rclone?

stdout is truncated at 80 columns when running:

rclone sync / cloudbackup:/ --links --stats 5s --config=/home/kevin/.config/rclone/rclone.conf --filter-from=/home/kevin/rclone-filter.txt --s3-max-upload-parts 1000 --order-by size,asc \
 --log-file /data/temp/rclone-log-file.txt \
 --fast-list --stats-file-name-length 140 -v \
 --checkers 16 --s3-upload-concurrency=8 --transfers 8 -P > /data/temp/rclone-out-file.txt

The truncation only occurs when output is redirected. i.e. If I remove the "> /data/temp/rclone-out-file.txt" it will write full lines to the terminal, but when I redirect the output it is truncated at 80 columns.

Setting envirnment variable COLUMNS=300 does not change the behavior.

What is your rclone version (output from rclone version)

rclone v1.57.0
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.11.0-38-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.2
- go/linking: static
- go/tags: none
kevin@boxtop:/data/

Which cloud storage system are you using? (eg Google Drive)

cloud.idrive.com in S3 mode

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync / cloudbackup:/ --links --stats 5s --config=/home/kevin/.config/rclone/rclone.conf --filter-from=/home/kevin/rclone-filter.txt --s3-max-upload-parts 1000 --order-by size,asc \
 --log-file /data/temp/rclone-log-file.txt \
 --fast-list --stats-file-name-length 140 -v \
 --checkers 16 --s3-upload-concurrency=8 --transfers 8 -P

The rclone config contents with secrets removed.

[idrivecloud]
type = s3
provider = Other
env_auth = false
access_key_id = REMOVED
secret_access_key = REMOVED
endpoint = s3.us-west-1.idrivecloud.io
acl = private

[xidrivecloud]
type = crypt
remote = idrivecloud:
filename_encryption = off
directory_name_encryption = false
password = REMOVED
password2 = REMOVED

[cloudbackup]
type = alias
remote = xidrivecloud:

A log from the command with the -vv flag

Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         5.0sTransferred:                    0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:        10.0sTransferred:                    0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:        15.0sTransferred:             44.190 MiB / 243.866 GiB, 0%, 10.281 MiB/s, ETA 6h44m44s
Checks:               581 / 10604, 5%
Transferred:           56 / 10073, 1%
Elapsed time:        20.0s
Checking:
 *                                             data/syncthing/attlaptop/flashdri
 * data/syncthing/susanpc/susanpc-documents-backup/Data Science + Protein…owds
 *                                                                  data/syncthi
 *                                                               data/syncthing/
 *                                                                  data/syncthi
 *
 *                                                                    data/synct
 *                                     data/syncthing/susanpc/susanpc-documents-
 *            data/syncthing/susanpc/susanpc-documents-backup/Data Science + Pro
 *                                          data/syncthing/susanpc/susanpc-docum
 *            data/syncthing/susanpc/susanpc-documents-backup/Data Science + Pro
 *                                                                 data/syncthin
 *                                                          data/syncthing/susan
 *                                                    data/syncthing/attlaptop/f
 *            data/syncthing/susanpc/susanpc-documents-backup/Data Science + Pro
 *            data/syncthing/susanpc/susanpc-documents-backup/Data Science + Pro
Transferring:
 *
 *
 *
 *                         data/install/install-disk-Windows/desktop-enh-and-mac
 *                         data/install/install-disk-Windows/desktop-enh-and-mac
 *                        data/install/install-disk-Windows/desktop-enh-and-macr
 *                            data/install/install-disk-Windows/desktop-enh-and-
 *            data/install/install-disk-Windows/desktop-enh-and-macro-tools/konfTransferred:      113.202 MiB / 244.157 GiB, 0%, 12.213 MiB/s, ETA 5h41m1s
Checks:              1245 / 11038, 11%
Transferred:          145 / 10169, 1%
Elapsed time:        25.0s
Checking:
 *                                   data/syncthing/attlaptop/flashdrive/@Portab
 *                                                                    data/synct
 *                                                   data/syncthing/attlaptop/kk
 *
 *                                                                        data/s
 *                                         data/syncthing/attlaptop/flashdrive/@
 *                                                                        data/s
 *                                          data/syncthing/attlaptop/kk4056/Favo
 *                                              data/syncthing/susanpc/susanpc-d
 *                                                                 data/syncthin
 *                                              data/syncthing/susanpc/susanpc-d
 *                                               data/syncthing/susanpc/susanpc-
 *                                           data/syncthing/attlaptop/kk4056/Fav
TRUNCATED

This is because of the use of -P. It was designed to be shown on a terminal and if you redirect its output it can no longer read the width of the terminal so defaults to 80 characters.

So if you are redirecting the output I suggest you don't use -P but instead use --stats 1s to show the stats block every 1 second.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.