What is the problem you are having with rclone?
Not necessary a rclone problem just having trouble appending a date timestamp to an rclone log in a script.
What is your rclone version (output from
Which OS you are using and how many bits (eg Windows 7, 64 bit)
The command you were trying to run (eg
rclone copy /tmp remote:tmp)
rclone sync -v --stats=0 --dry-run \
--log-file=/home/user/.mylogs/rclone-'date +"%Y%m%d"'.log \
So this is more of a linux question, maybe someone with fresh eyes can see the issue and point me in a direction. Thanks in-advance for any help.
this works for me
rclone lsd gdrive01: -vv --log-file=./rclone_`date +%Y%m%d_%H%M%S`.log
creates a file named
@asdffdsa I've tried that variation in the script and directly from the command line the resulting file is still ...
I think I've isolated the issue. I've been using an apostrophe
' but when i copied your code, it appears to have a backtick
`. That seems to be the difference that is making it work. Wow, thank-you!
sure, glad to help.
i am a newbie at linux and made the same mistake you did.
i would imagine, everybody makes that mistake once, never twice
Backtick is correct, however there is a more modern and easier to read way to write it namely
$() is great because you can nest it
parent=$(basename $(dirname $PWD))
See the bash FAQ for more reasons to use it.
It is supported on all shells since about 20 years ago
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.