Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2AB7810671 for ; Thu, 29 Aug 2013 20:51:11 +0000 (UTC) Received: (qmail 43408 invoked by uid 500); 29 Aug 2013 20:51:06 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 43261 invoked by uid 500); 29 Aug 2013 20:51:06 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 43254 invoked by uid 99); 29 Aug 2013 20:51:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 20:51:05 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chengi.liu.86@gmail.com designates 209.85.192.171 as permitted sender) Received: from [209.85.192.171] (HELO mail-pd0-f171.google.com) (209.85.192.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 20:50:59 +0000 Received: by mail-pd0-f171.google.com with SMTP id g10so939047pdj.30 for ; Thu, 29 Aug 2013 13:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/oUANZAd7HfCV9J983ZPFf0mZnJMmXVKcl9F+1TAmPg=; b=gA2T47XtwI3J+mYqp7y4QvDSiiUO3aQziGvG6T7kJ7fXxxJOY5y/SFIvNONDf8l/Xf Y2fhQoNngaVqlft/wBlfCHxnGOLcpcqZ/WzBFEz6Db6b2DZqwelxmLMN9R5Zy3dNp09c tRns4/4CPq39ssGFj+8SAor0e548m8QIkiGLlx9LVVPHmVNjuhT7A3e7lV31wAjbAE/Y Z2SR3TUXNU191IbMIR9Q+hOQAaKrxRwobXNjA7jtY2e4uu0gQ20yobb9PsY+dBvQrgeW Hhnv6qHMAisqKtQItqs8mAuEH0NETF9+QBLrRsDo48vBM08j7ZM5kr39Z9zgMJYbUJYa MDMQ== MIME-Version: 1.0 X-Received: by 10.66.176.143 with SMTP id ci15mr6332699pac.146.1377809437969; Thu, 29 Aug 2013 13:50:37 -0700 (PDT) Received: by 10.70.28.130 with HTTP; Thu, 29 Aug 2013 13:50:37 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Aug 2013 13:50:37 -0700 Message-ID: Subject: Re: copy files from hdfs to local fs From: Chengi Liu To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7bd751601e544104e51c427a X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd751601e544104e51c427a Content-Type: text/plain; charset=ISO-8859-1 tail will work as well.. ??? but i want to extract just (say) n lines out of this file? On Thu, Aug 29, 2013 at 1:43 PM, Kim Chew wrote: > hadoop fs -copyToLocal > or > hadoop fs -get > > It copies the whole file and won't be able just to copy part of the file, > what is interesting is there is a "tail" command but no "head". > > Kim > > > On Thu, Aug 29, 2013 at 1:35 PM, Chengi Liu wrote: > >> Ok, >> >> A very stupid question... >> >> I have a large file in >> >> /user/input/foo.txt >> >> I want to copy first 100 lines from this location to local filesystem... >> >> And the data is very sensitive so i am bit hesistant to experiment. >> >> What is the right way to copy sample data from hdfs to local fs. >> >> > --047d7bd751601e544104e51c427a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
tail will work as well.. ??? but i want to extract just (s= ay) n lines out of this file?


On Thu, Aug 29, 2013 at 1:43 PM, Kim Chew <kchew5= 34@gmail.com> wrote:
hadoop = fs -copyToLocal
or
hadoop fs -get

It copies = the whole file and won't be able just to copy part of the file, what is= interesting is there is a "tail" command but no "head"= .

Kim<= br>


On Thu, Aug 29, 2013 at= 1:35 PM, Chengi Liu <chengi.liu.86@gmail.com> wrote:<= br>
Ok,

=A0 A very stupid question...

I have a larg= e file in=A0

=A0 =A0 /user/input/foo.txt

I = want to copy first 100 lines from this location to local filesystem...

And the data is very sensitive so i am bit hesistant to= experiment.

What is the right way to copy sample = data from hdfs to local fs.



--047d7bd751601e544104e51c427a--