User Tools

Site Tools


find_usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
find_usage [2022/09/02 07:01] – [list files in chronological order] rajufind_usage [2024/01/03 21:58] – [find number of words in all files under a directory] raju
Line 39: Line 39:
 Ref:- https://askubuntu.com/questions/926422/how-to-count-the-total-number-of-words-from-all-the-files-in-a-directory/1286714 Ref:- https://askubuntu.com/questions/926422/how-to-count-the-total-number-of-words-from-all-the-files-in-a-directory/1286714
  
 +==== gunzip files on nfs and copy to hadoop ====
 +<code>
 +files_to_copy=`find $dir -maxdepth 1 -iname '*.avro.gz' -newer $tmp_file -print
 +for i in $files_to_copy
 +do
 +    unzipped_file=${tmp_nfs_dir}/`basename $i | sed -e 's/\.gz$//'`
 +    gunzip $i -c > $unzipped_file
 +    hadoop fs -put -f $unzipped_file $hdfs_dir
 +    echo "$unzipped_file -> $hdfs_dir"
 +    rm -f $unzipped_file
 +done
 +</code>
 +
 +tags | process the output of find
 ==== dummy ==== ==== dummy ====
   * [[grep on find results]]   * [[grep on find results]]
find_usage.txt · Last modified: 2024/03/12 23:10 by raju