Need help how to copy few records from hdfs to UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help how to copy few records from hdfs to UNIX
# 1  
Old 08-26-2015
Need help how to copy few records from hdfs to UNIX

Hi All ,

I am facing one issue here...I have a huge file in hadoop file system.Some disk space issues are thr ,thatswhy I want to copy 1st 100 records from hdfs to local unix.I tried below command but it is no working .Its giving error like cat: Unable to write to output stream.if any one can help me ,that will be really helpful.

HTML Code:
hdfs dfs -cat /DEV/batch/storage/source/raw/private/G5XRMBB0.txt |head -100 /Data/sample_G5XRMBB0.txt
# 2  
Old 08-26-2015
Please show the error message.
# 3  
Old 08-26-2015
Code:
hdfs dfs -cat /DEV/batch/storage/source/raw/private/G5XRMBB0.txt |head -100 > /Data/sample_G5XRMBB0.txt


Last edited by Aia; 08-26-2015 at 12:32 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To get latest hdfs file system

Hi All, I am having below hdfs file system /user/home/dte=2019_01_30/part_1 /user/home/dte=2019_01_30/part_2 /user/home/dte=2019_01_31/part_1 I need to take the latest month hdfs folder while passing date as parameter. For eg . if i pass as Feb month i.e. 20190201(YYYYMMDD), then... (0 Replies)
Discussion started by: Master_Mind
0 Replies

2. Shell Programming and Scripting

Shell Script for HDFS Ingestion Using JDBC

Peers, I was in process of building a script that connects to salesforce using jdbc and pull the data using spark and process in hive table. During this process I have encountered a problem where and variable assigned with hadoop command that list files in Azure Data lake is not parsing the... (2 Replies)
Discussion started by: jg355187
2 Replies

3. UNIX for Beginners Questions & Answers

Help with HDFS Linux permission

Hi, I am unable to change the permissions for a directory in HDFS. from what i understand acl's supersede all other permissions. even if a directory is not owned by me, but there is an acl for me with rwx then i must be able to change the permissions of that directory. Please find the... (8 Replies)
Discussion started by: desind
8 Replies

4. UNIX for Beginners Questions & Answers

UNIX and HDFS - file systems on same partition.

I am learning Hadoop. As a part of that, Hdfs - Hadoop distributed file system has commands similar to unix where we can create,copy,move files from unix/linux file system to HDFS. My question is 1) how two file systems (unix and hdfs) can coexist on thr same partition.. 2)What if block... (1 Reply)
Discussion started by: Narendra Eliset
1 Replies

5. UNIX for Advanced & Expert Users

UNIX and HDFS - file systems on same partition.

I am learning Hadoop. As a part of that, Hdfs - Hadoop distributed file system has commands similar to unix where we can create,copy,move files from unix/linux file system to HDFS. My question is 1) how two file systems (unix and hdfs) can coexist on thr same partition.. 2)What if block used... (0 Replies)
Discussion started by: Narendra Eliset
0 Replies

6. Shell Programming and Scripting

Downloading hdfs file to local UNIX through UNIX script

Hi All , I am very new to unix script.I am aware of unix commands but never put together in unix script level.If any one can suggest me technical guidance in the below scenario that will highly beneficial. Data have been already migrated from mainframe to Hadoop file system(HDFS).HDFS server... (15 Replies)
Discussion started by: STCET22
15 Replies

7. UNIX for Dummies Questions & Answers

awk command to copy field to bottom records

Hi All, I have a below input, I want to copy the Job_name and Created_by field information to other bottom records as shown in below Output Job_name Created_by Modified_on Modified_by CGI_ACLMIB n38504 2014-05-07 20:40:48 n38504 2014-05-07 20:40:57 n38504 2014-05-08 20:40:57 n48504... (1 Reply)
Discussion started by: somu_june
1 Replies

8. Shell Programming and Scripting

Copy header values into records

I'm using a shell script to manipulate a data file. I have a large file with two sets of data samples (tracking memory consumption) taken over a long period of time, so I have many samples. The problem is that all the data is in the same file so that each sample contains two sets of data.... (2 Replies)
Discussion started by: abercrom
2 Replies

9. Windows & DOS: Issues & Discussions

How to copy a file with long records ,i.e spanning to 2 or 3 lines from UNIX to excel?

Hi Experts, I have a Unix csv file which has long records ie the record length is more than 80 so it goes to the next line.So when its in unix though it spans to two or three lines it still counts it as one record. But what is happening is for the records that are long when i copy it into excel i... (0 Replies)
Discussion started by: 100bees
0 Replies

10. UNIX for Advanced & Expert Users

Match the string and copy records to another location

Hi, I have particular set of files which have the below contents: ****** PBX TYPE:ID6 PBX-id: A11 rolled on 123456 368763 00 >>>>>> A11,2008-07-01 21:31:00.000,42,42112, ,XXXXXXXX A11,2008-07-01 21:40:00.000,6, , ,XXXXXXX A12,2008-07-01 21:53:00.000,68, , ,XXXXXXXX... (12 Replies)
Discussion started by: bsandeep_80
12 Replies
Login or Register to Ask a Question