daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. > hadoop fs -ls /path/to/directory
  2. Found 2 items
  3. drwxr-xr-x   - hadoop hadoop          2 2016-10-12 16:20 /path/to/directory/tmp
  4. -rwxr-xr-x   3 hadoop hadoop 4691945927 2016-10-12 19:37 /path/to/directory/myfile.csv
  5.      
  6. for filename in /path/to/another/directory/*.csv; do echo $filename; done
  7.      
  8. for filename in `hadoop fs -ls /path/to/directory | grep csv`; do echo $filename; done
  9.      
  10. Found
  11. 2
  12. items
  13. drwxr-xr-x
  14.  
  15. hadoop
  16. hadoop
  17. 2    
  18. 2016-10-12
  19. ....
  20.      
  21. for filename in `hadoop fs -ls /path/to/directory | awk '{print $NF}' | grep .csv$ | tr 'n' ' '`
  22. do echo $filename; done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top