2

This question already has an answer here:

I am copying some large datasets to google drive using rclone in Linux on MobaXterm. First, I copy the dataset using;

-cpu:~$ nohup rclone copy /path_to_source/. /path_to_destination &

once copying is completed, I use sync to make sure everything is copied using;

-cpu:~$ nohup rclone sync /path_to_source/. /path_to_destination &

Now when check the job status using;

ps -ef | grep rclone

For one of the jobs, it gives;

[3]+  Exit 1         nohup rclone sync /path_to_source/. /path_to_destination &

I was expecting to see 'Done' instead of 'Exit 1'. What does this mean? Does it mean sync is unsuccessful? If so what would be the reason?

marked as duplicate by DopeGhoti, Rui F Ribeiro linux Apr 2 at 0:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4

The Exit 1 means your command resulted in exit code 1.

The exit code comes from either the nohup command, or the rclone sync command. The former will usually create exit codes with very high values on any errors, so it's probably from the latter.

If the nohup command worked, it will probably have created a nohup.out file in the directory you ran the command in. It contains any output the rclone sync command may have created, so if that file exists, reading it will probably solve the mystery.

The documentation page of rclone has a paragraph titled List of exit codes almost at the end of the page:

List of exit codes

0 - success
1 - Syntax or usage error
2 - Error not otherwise categorised
3 - Directory not found
4 - File not found
5 - Temporary error (one that more retries might fix) (Retry errors)
6 - Less serious errors (like 461 errors from dropbox) (NoRetry errors)
7 - Fatal error (one that more retries won’t fix, like account suspended) (Fatal errors)
8 - Transfer exceeded - limit set by --max-transfer reached
  • thank you, it helped! – kutlus Apr 1 at 20:53
4

The answer to which you linked does answer your question exactly. Exit 1 means that your backgrounded job completed, but threw a nonzero exit code (in this case, 1) which usually indicates some sort of error condition. You will see Done when the job's exit code is zero:

$ sleep 4 &
[1] 98565
$ # Wait a few seconds, and press Enter..
[1]+  Done                    sleep 4
$ ( sleep 4; exit 44 ) &
[1] 98613
$ # Wait a few seconds, and press Enter..
[1]+  Exit 44                 ( sleep 4; exit 44 )
  • Thank you, this answer was also helpful and I have voted for you. – kutlus Apr 1 at 20:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.