Limiting the maximum output of listed files in a directory

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

Running commands like ls, lsl, lsd returns all the files of a folder, however I can't seem to find a command/options akin to the --max-depth option for directories.

Additionally, a quick peruse of filtering doesn't seem to allude to anything straightforward.

Run the command 'rclone version' and share the full output of the command.

rclone v1.68.1

  • os/version: darwin 12.7.6 (64 bit)
  • os/kernel: 21.6.0 (x86_64)
  • os/type: darwin
  • os/arch: amd64
  • go/version: go1.23.2
  • go/linking: dynamic
  • go/tags: none

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

Dropbox

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

rclone lsl dBox:Camera\ Uploads/

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[dBoxBUP]
type = crypt
remote = dBox:Ď€bUP
password = XXX
password2 = XXX

A log from the command that you were trying to run with the -vv flag

2024/10/13 23:55:25 DEBUG : rclone: Version "v1.68.1" starting with parameters ["rclone" "lsl" "-vv" "dBox:Camera Uploads/"]
2024/10/13 23:55:25 DEBUG : Creating backend with remote "dBox:Camera Uploads/"
2024/10/13 23:55:25 DEBUG : Using config file from "/Users/eli5/.config/rclone/rclone.conf"
2024/10/13 23:55:26 DEBUG : fs cache: renaming cache item "dBox:Camera Uploads/" to be canonical "dBox:Camera Uploads"
...
2024/10/13 23:56:18 DEBUG : 8 go routines active
2024/10/13 23:56:18 INFO  : Dropbox root 'Camera Uploads': Committing uploads - please wait...

Although I'm looking for (a) complete solution(s), if what I'm intending to do is possible, a command/filter/workaround akin to CLI commands like head, less, etc to do a would still be great. I sometimes just need to do a quick check in the terminal and rclone ncdu is a tad overkill.

I'm open to workaround scripts, piping to other CLI commands, etc if need be.

Apologies in advance if the answer is in front of my tired eyes within the ls docs!

What about you mount your remote and then use whatever you prefer and your OS provides?

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