首页 > 代码库 > 查找生成的目录

查找生成的目录

vi dir-listening.sh

#!/bin/bash


# command

date="/bin/date"

ha="/usr/bin/hadoop fs -ls -d"

# var

y=`$date +%Y`

m=`$date +%D | cut -d"/" -f1`

d=`$date +%d`

h=`$date +%H`

dir="/cstreaming/DAT/${y}${m}${d}${h}*"


$ha $dir | grep -v -i found | awk ‘{print $6,$7,$8}‘

./dir-listening.sh

2014-08-27 17:02 /cstreaming/DAT/2014082717_2014082716

2014-08-27 17:07 /cstreaming/DAT/2014082717_2014082717




本文出自 “小崔的实验笔记” 博客,谢绝转载!

查找生成的目录