rsync command not found

I am trying to use the following command in the terminal:

+*sudo rsync -a --delete "SOURCE" "DESTINATION"*+

but it's returning the following message:

+*-bash: sudo rsync -a: command not found*+

I have been able to run the command before but now it's not working. Any idea what's going on and how I can fix it? I run this same command on another computer and it works fine as well, this only is happening on my wife's MacBook.

Thanks!

iMac 21.5" / 3.06GHz Intel Core i3 / 4GB RAM / 500GB HD, Mac OS X (10.6.4), 16GB iPhone 3GS / iOS 4.0.2

Posted on Aug 21, 2010 9:03 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 22, 2010 6:39 AM

The fact that you got:

-bash: sudo rsync -a: command not found

is a strong indication that 'bash' saw 'sudo rsync -a' as one token and as the command it could not find.

Normally you should see

-bash: command_name: command not found

But in your case, it saw what I would have considered the first 3 tokens as a single command name.

The question is why bash did NOT parse 'sudo' separate from 'rsync' separate from '-a'? But instead treated all 3 as a single token.

Were there any stray quotes (single ' or double ") you forgot to mention? For example:

"sudo rsync -a" --delete "SOURCE" "DESTINATION"
'sudo rsync -a' --delete "SOURCE" "DESTINATION"
sudo rsync -a --delete "SOURCE" "DESTINATION"

Any of these 3 would have generated the error you reported.
11 replies
Question marked as Top-ranking reply

Aug 22, 2010 6:39 AM in response to bronson

The fact that you got:

-bash: sudo rsync -a: command not found

is a strong indication that 'bash' saw 'sudo rsync -a' as one token and as the command it could not find.

Normally you should see

-bash: command_name: command not found

But in your case, it saw what I would have considered the first 3 tokens as a single command name.

The question is why bash did NOT parse 'sudo' separate from 'rsync' separate from '-a'? But instead treated all 3 as a single token.

Were there any stray quotes (single ' or double ") you forgot to mention? For example:

"sudo rsync -a" --delete "SOURCE" "DESTINATION"
'sudo rsync -a' --delete "SOURCE" "DESTINATION"
sudo rsync -a --delete "SOURCE" "DESTINATION"

Any of these 3 would have generated the error you reported.

Aug 23, 2010 4:00 AM in response to bronson

What is the value of

echo "@$IFS@" | cat -vt

IFS is the Inter-Field-Seperator and is used by bash to parse command lines. I expect nothing between the pair of @@ (at signs) or a space and a tab (^T). Anything else and I start to wonder.

It is possible the .profile or .bash_profile changed IFS for some scripting thing and forgot to change it back.

I think this is a long shot idea, and I'm sure my idea has a flaw in it, but getting the value cannot hurt.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

rsync command not found

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.