It appears that you either did not have the directory mounted or it was
in power saving mode (disks spun down, etc.)
I would recommend that you to either manually make sure that the source
and destinations are both available or setup some wait loop in your
script to allow and trigger mounting.
Ages ago, I wrote/used this simple bash function which waits for disk
to spin up and become available on the file system.
function waitForDir () {
# waits for directory to not be empty
local maxWait=30
local c=0
if (( $# != 1 )); then
>&2 echo "ERROR: Please give directory as cmd argument."
exit 0
fi
while (( $(ls $1 | wc -l) == 0 )); do
if (( $c > $maxWait )); then
>&2 echo "ERROR: Directory $1 missing content after $maxWait
seconds"
exit 0
else
c=$(( $c + 1 ))
fi
sleep 1
done
}
Then I used it this way:
waitForDir /media/jjj/Movies
Note: that it needs some content to be in the directory.
Best regards, Tomas
On Sat, 2018-09-29 at 11:01 -0700, John Jason Jordan wrote:
> On Fri, 28 Sep 2018 22:39:53 -0700
> John Jason Jordan <[email protected]> dijo:
>
> Problem solved:
>
> cd ..
> cd /media/jjj/Movies
>
> Now the rsync command works as expected, as do other commands.
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug