-   Linux - Software (
-   -   rsync works differently under tcsh than bash? (

Vanyel 08-31-2009 05:42 PM

rsync works differently under tcsh than bash?
Hello. Here is my problem.

On server "xanadu" (which is running Debian Linux 5.0, btw), Users' homedirs are located under /xanadu. So user "sue" will have a home of /xanadu/sue .

/home is actually a mount to a remote file server, so /home/sue isn't on the local disk at all.

SO I'm seeing that if Sue's shell is /bin/bash and "rsync -av --progress $HOME/ /home/$USER --exclude=.**" is executed, rsync copies all the new files in her home directory, excluding the dot files, to her dir on the remote mount as expected.

HOWEVER, if Sue's shell is /bin/tcsh, the same command won't work! I just get "rsync: No match."

What's going on? Why should rsync's behavior change depending on shell? I checked and the environment variables $HOME and $USER have the same values under either shell ("/xanadu/sue" and "sue", respectively).

I'm stumped on this one. Ideas?

- Van

makyo 08-31-2009 06:50 PM


I suspect it's the shell, not rsync: probably because tcsh variable nonomatch is not set (pardon the plethora of negatives).

It's similar to the bash option failglob. In both, an error is thrown if the pathname expression cannot be expanded ("globbed").

To experiment, use:

echo --exclude=.**
with set nonomatch and unset nonomatch
(are you sure you meant 2 asterisks?)

Personally, I would use a script that is executed (coded) with bash, so that you would not run into problems with the user's setting.

Best wishes ... cheers, makyo

Vanyel 09-01-2009 09:55 AM


I went this way because all the Users have, and need, tcsh for programs they run. But after playing with it, yes, it is easier to make a script executed with bash instead of converting my code to .tcsh. Just did that now and it's working fine.

- Van

All times are GMT -5. The time now is 03:39 AM.