How to refresh --dir-cache-time without --rc

What is the problem you are having with rclone?

How to refresh --dir-cache-time from cron without --rc because my seedbox said it doesnt allow --rc
at the moment i unmount and mount to refresh it from cron but rather a safer way.

i set my --dir-cache-time 9999h because there isn't any change to cloud until i rclone move once a week so no need to refresh it until then. I cant change --dir-cache-time 168h because if the drive stops in the middle of the week, when i remount it the time wont refesh at the same time as rclone move

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

rclone v1.63.1

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


thanks :slight_smile:

if you want to refresh the dir/file names, might be able to do a simple command line
ls -R /path/to/mountpoint

thanks but that doesn't look like it worked. to test i created a folder from rclone command

rclone mkdir crypt:test folder

I run your command

ls -R /home/me/media/cloud

but the new folder didnt show when i looked in my mount. it shows when i unmount and mount.

rclone might not notice a new empty dir.
so might test, creating a new file.

tho, seems like box allows for empty dir, based on output of rclone backend
"CanHaveEmptyDirectories": true

If you had the output of rclone version, might be able to offer a suggestion.

yeah still didnt work, i moved a video over with rclone move and running that didnt refresh

solution below :slight_smile: thanks all

sorry, might do this before that file copy and ls

You can send a SIGHUP signal to rclone for it to flush all directory caches, regardless of how old they are. Assuming only one rclone instance is running, you can reset the cache like this:

kill -SIGHUP $(pidof rclone)
1 Like

thanks heaps really appreciate it that did the job :smiley:

ok, good. ......

1 Like

just a quick question, would that wouldn't effect rclone move if i ran
kill -SIGHUP $(pidof rclone)
while rclone move was happening?

why not run a quick test?

tho, for fun, i guess that rclone will transfer the file successfully.

as rclone has two caches, and the cache you are asking about is the dir cache, not the file cache.
might check out my comparison of the two caches.

1 Like

yeah looks like it does stop it but thats fine, thanks again

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