Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-31-2009, 05:42 PM   #1
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Rep: Reputation: 29
Unhappy 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
Old 08-31-2009, 06:50 PM   #2
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 732

Rep: Reputation: 75

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
Old 09-01-2009, 09:55 AM   #3
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Original Poster
Rep: Reputation: 29

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



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash behaving differently jxrod2000 Linux - Software 2 10-06-2008 05:58 PM
ssh -X user@server works differently from two clients? xp_newbie Linux - Server 3 04-05-2007 11:16 AM
Debian: AWStats works differently when going to IP or hostname Punkrulz Linux - Software 0 01-13-2006 12:07 PM
SuSE works differently from Mandrake? escordeiro Linux - Newbie 1 09-30-2004 08:28 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration