From owner-freebsd-questions@FreeBSD.ORG Sat Mar 9 10:11:36 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7B73D263 for ; Sat, 9 Mar 2013 10:11:36 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 2F6D78B0 for ; Sat, 9 Mar 2013 10:11:35 +0000 (UTC) Received: from [46.244.250.106] (helo=localhost.my.domain) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1UEGkS-0004R4-QU; Sat, 09 Mar 2013 11:11:29 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.4/8.14.3) with ESMTP id r29ABRes002636; Sat, 9 Mar 2013 11:11:27 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.4/8.14.3/Submit) id r29ABQHR002635; Sat, 9 Mar 2013 11:11:26 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sat, 9 Mar 2013 11:11:26 +0100 From: Matthias Apitz To: Eduardo Morras Subject: Re: How to know % of read file in cat? Message-ID: <20130309101126.GA2609@tinyCurrent> References: <20130309105400.b181e12aa222502974715a1b@yahoo.es> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130309105400.b181e12aa222502974715a1b@yahoo.es> X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 46.244.250.106 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2013 10:11:36 -0000 El día Saturday, March 09, 2013 a las 10:54:00AM +0100, Eduardo Morras escribió: > > Hello, > > I use cat to read a file and pass it to another app, the command is this: > > camibar% cat file.git | fossil import --git file.fossil > > It takes a lot of time, file.git is 12GB, and i want to know if there's some 'magic' trick can I use to show me how many bytes or the % of the file.git cat sent to the other app. > > Maybe cat isn't the correct tool? Yes, in your case cat(1) is superflues (see also the Useless Use of Cat Award) because the correct way would be: camibar% fossil import --git file.fossil < file.git It depends of the tool 'fossil' if you can monitor somehow the progress, for example if it writes a log or with accounting tools how many bytes have been read, etc. HIH matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: www.asciiribbon.org E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards