Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 May 2011 02:17:30 +0200
From:      Polytropon <freebsd@edvax.de>
To:        freebsd-questions@freebsd.org
Cc:        George Sanders <gosand1982@yahoo.com>
Subject:   Re: Any way to have login output AND use rsync/scp ?
Message-ID:  <20110502021730.f87d654f.freebsd@edvax.de>
In-Reply-To: <20110502021317.af30339c.freebsd@edvax.de>
References:  <761855.57021.qm@web120004.mail.ne1.yahoo.com> <20110502021317.af30339c.freebsd@edvax.de>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, 2 May 2011 02:13:17 +0200, Polytropon <freebsd@edvax.de> wrote:
> On Sun, 1 May 2011 15:58:45 -0700 (PDT), George Sanders <gosand1982@yahoo.com> wrote:
> > I have my .cshrc file run some basic netstat and 'w' commands so that when I log 
> > in, I can see at a glance what is going on on the system and notice any unusual 
> > login activity, etc.
> > 
> > However this completely breaks both scp and rsync - they cannot function at all 
> > (apparently) with any kind of stdio output from the shell.
> > 
> > Is there any way around this ?
> 
> 
> Create a file ~/.login and put your commands (in sh syntax,
> not csh) there. This file will only be executed at interactive
> logins. See "man csh", section FILES for details.

Sorry, wrote before thinking. :-)

Of course ~/.login is csh syntax, as I would guess after
(missed to) read the file's header which states:

# .login - csh login script, read by login shell, after `.cshrc' at login.
# see also csh(1), environ(7).

So simply moving your commands from .cshrc to .login
should be fully sufficient.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20110502021730.f87d654f.freebsd>