LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-05-2009, 04:55 AM   #1
martinhb
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Rep: Reputation: 0
Suppressing warning banners with rsync


On our RHEL 4 system we use a script to update various disks. Inside the script we use a command similar to:

rsync -ae ssh -q /source-dir ${REMOTE_HOST}:/destination-dir

We have set up ssh so that it displays a warning banner when it is used that we can suppress using the -q option if it is being used as part of a script. As you can see from the command above we added the -q option to the ssh command but it does not suppress the warning message.

Does anyone know how to?

Thanks
 
Old 01-05-2009, 07:08 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
From the rsync man page:

Code:
       -e, --rsh=COMMAND
              This  option  allows  you  to choose an alternative remote shell
              program to use for communication between the  local  and  remote
              copies  of  rsync.  Typically, rsync is configured to use ssh by
              default, but you may prefer to use rsh on a local network.

              If this option is used with [user@]host::module/path,  then  the
              remote  shell COMMAND will be used to run an rsync daemon on the
              remote host, and all  data  will  be  transmitted  through  that
              remote  shell  connection,  rather  than through a direct socket
              connection to a running rsync daemon on the  remote  host.   See
              the  section  "USING  RSYNC-DAEMON  FEATURES  VIA A REMOTE-SHELL
              CONNECTION" above.

              Command-line arguments are permitted in  COMMAND  provided  that
              COMMAND  is  presented  to rsync as a single argument.  You must
              use spaces (not tabs or other whitespace) to separate  the  com-
              mand  and  args  from each other, and you can use single- and/or
              double-quotes to preserve spaces in an argument (but  not  back-
              slashes).   Note  that  doubling a single-quote inside a single-
              quoted string gives you a  single-quote;  likewise  for  double-
              quotes  (though  you  need to pay attention to which quotes your
              shell is parsing and which quotes rsync is parsing).

              (emphasis added)
So I think you could do something like:

Code:
rsync -ae "ssh -q" /source-dir ${REMOTE_HOST}:/destination-dir
 
  


Reply


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
Variables Used in Banners Palula Linux - Newbie 3 11-03-2005 08:55 AM
Suppressing the output from tar marri Programming 2 05-03-2005 03:19 AM
how do I create anamated banners ??? BaerRS Linux - General 4 05-30-2002 05:44 PM
Banners Eternal LQ Suggestions & Feedback 4 03-17-2002 09:39 AM
Banners SkYzOpReNiCk LQ Suggestions & Feedback 1 10-14-2001 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:38 AM.

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