From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John Holp" Subject: copying lines from one file to another using vi Date: Sat, 6 Feb 2010 15:29:25 -0500 Message-ID: <911903C52CE64CBBA9EE580F74300C45@jholpPC> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1349067929485866996==" Return-path: Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o16KTkwg032088 for ; Sat, 6 Feb 2010 15:29:47 -0500 Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o16KTVAM025665 for ; Sat, 6 Feb 2010 15:29:32 -0500 Received: from jholpPC (c-69-250-118-36.hsd1.md.comcast.net [69.250.118.36]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.6/8.13.6) with ESMTP id o16KTNwP000946 for ; Sat, 6 Feb 2010 15:29:30 -0500 (EST) (envelope-from jholp@chesapeake.net) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com This is a multi-part message in MIME format. --===============1349067929485866996== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0E8E_01CAA741.2A37E720" This is a multi-part message in MIME format. ------=_NextPart_000_0E8E_01CAA741.2A37E720 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Redhat wizards, I am doing good with auditing but want to copy key lines from example = files into /etc/audit/audit.rules What is the vi/vim syntax to copy lines from one file and post them into = another file - i.e. my audit.rules file? 5yy appears to yank the current line and 4 more and one can paste the = buffered lines into the same file but I want to pass the lines to a = different file. :h file_name I recall from along ago but that is for an entire file = - I think: Please help me to copy files from sample auditing files into my real = "audit.rules". Thanks,=20 John ------=_NextPart_000_0E8E_01CAA741.2A37E720 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Redhat wizards,
 
I am doing good with auditing but want = to copy key=20 lines from example files into /etc/audit/audit.rules
 
What is the vi/vim syntax to = copy lines from=20 one file and post them into another file - i.e. my audit.rules=20 file?
 
5yy appears to yank the current line = and 4=20 more and one can paste the buffered lines into the same file but I = want to=20 pass the lines to a different file.
 
:h file_name     I = recall from along=20 ago but that is for an entire file - I think:
 
Please help me to copy files from = sample auditing=20 files into my real "audit.rules".
 
 
Thanks,
 
John
------=_NextPart_000_0E8E_01CAA741.2A37E720-- --===============1349067929485866996== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1349067929485866996==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Viro Subject: Re: copying lines from one file to another using vi Date: Sat, 6 Feb 2010 15:48:35 -0500 Message-ID: <20100206204835.GC993@shell.devel.redhat.com> References: <911903C52CE64CBBA9EE580F74300C45@jholpPC> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <911903C52CE64CBBA9EE580F74300C45@jholpPC> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: John Holp Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Sat, Feb 06, 2010 at 03:29:25PM -0500, John Holp wrote: > Redhat wizards, > > I am doing good with auditing but want to copy key lines from example files into /etc/audit/audit.rules > > What is the vi/vim syntax to copy lines from one file and post them into another file - i.e. my audit.rules file? > > 5yy appears to yank the current line and 4 more and one can paste the buffered lines into the same file but I want to pass the lines to a different file. > > :h file_name I recall from along ago but that is for an entire file - I think: > > Please help me to copy files from sample auditing files into my real "audit.rules". Switch to another file, then paste there... The most portable way is :n but in almost all vi variants there's a way to split the window and open a new file there. For nvi that would be :Vi for vim - :split and switching between those subwindows is ^W in nvi an ^Ww in vim.