Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to see progress when redirecting STDOUT #8358

Open
ukdocCT opened this issue Feb 3, 2025 · 1 comment
Open

Ability to see progress when redirecting STDOUT #8358

ukdocCT opened this issue Feb 3, 2025 · 1 comment

Comments

@ukdocCT
Copy link

ukdocCT commented Feb 3, 2025

The associated forum post URL from https://forum.rclone.org

none

What is your current rclone version (output from rclone version)?

rclone v1.69.0

What problem are you are trying to solve?

I have a remote sftp site configured.
I am trying to capture the output of lsjson to get the details of all the remote files so that i can work on a duplicate file not being transferred (fyi im attempting to replicate over 1 million files from another remote system).

I am using --log-file to capture the logs and --progress to see the status - which works perfect on its own, however the output of lsjson is output to the stdout so the only way of capturing that information is to redirect stdout to a file in the console.

How do you think rclone should be changed to solve that?

Is there a way of outputting the progress information to the console and still redirect the output of lsjson to stdout/file?
I can think of two possible solutions:

  1. add something similar to --output-file to the ls* commands so that their output goes to the file but progress/errors still goes to stdout
  2. add the ability to redirect progress to stderr, that way a redirect in the console still captures the ls file output but i can still see the command progress in the console window

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
@ncw
Copy link
Member

ncw commented Feb 4, 2025

  1. add something similar to --output-file to the ls* commands so that their output goes to the file but progress/errors still goes to stdout

This seems plausible.

  1. add the ability to redirect progress to stderr, that way a redirect in the console still captures the ls file output but i can still see the command progress in the console window

That will interfere with rclone's logging system (--log-file) and would be mega complex. I don't want to do that (shudders).

@ukdocCT do you want to have a go at option 1 ?

@ncw ncw added the enhancement label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants