title: getmerge command in hadoop datacopy
body: <p>My aim is to read all the files that starts with  "trans" in a directory  and convert them into a single file and load  that single file into HDFS location </p>
  
  <p>my source directory is /user/cloudera/inputfiles/</p>
  
  <p>Assume that inside that above directory , there are lot of file , but i need all the files that start with "trans"</p>
  
  <p>my destination directory is /user/cloudera/transfiles/ </p>
  
  <p>So i tried this command below </p>
  
  <pre><code>hadoop dfs - getmerge /user/cloudera/inputfiles/trans* /user/cloudera/transfiles/records.txt
  </code></pre>
  
  <p>but the above command is not working .</p>
  
  <p>If i try the below command then it works</p>
  
  <pre><code>hadoop dfs - getmerge /user/cloudera/inputfiles   /user/cloudera/transfiles/records.txt
  </code></pre>
  
  <p>Any suggestion on how do i merge some files from a hdfs location and store that merged single file in another hdfs location  </p>