brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: rclone ncdu lets you browse what fills a cloud remote

Rclone
~/tips/tip-rclone-ncdu-remote

rclone ncdu remote:backup

Explores a remote's folder sizes in a text interface before you clean up.

Cloud storage fills up quietly, and the web interface rarely tells you which folder is to blame. rclone has a size browser built in.

Point it at a remote or a folder inside one:

rclone ncdu remote:backup

It scans and builds a tree you can walk with the arrow keys, biggest things easy to spot. s sorts by size, C sorts by file count, g toggles the little graph and c shows counts. Press ? for the full key list and q to leave.

I like it for the moment before a cleanup, when I don’t yet know whether the space went into one huge video or a hundred thousand tiny files.

Be careful with one key. d deletes the highlighted item from the remote, and D deletes a selection. It asks before doing it, but this is the real storage and some backends have no trash to rescue you. If you only came to look, don’t press them.

The scan has to list everything, so a large remote takes a while and can cost API calls. Adding --fast-list uses fewer of those on backends that support recursive listing, in exchange for more memory. Filters such as --exclude work too, though unlike the Linux ncdu the excluded items simply don’t appear.

Further reading: rclone ncdu

More Rclone tips rclone copyurl https://example.com/files/big.iso remote:isos -a rclone size remote:photos rclone config redacted rclone copy /data remote:data --bwlimit "08:00,1M 18:00,5M 23:00,off" -P rclone lsf -R --files-only --format tsp remote:photos All Rclone tips (14) All topics

Link