i want last_modification time of file on hdfs. checked hdfs shell guide did not relevant command available.
hadoop version 2.4.0. can suggest how can last_modification time of hdfs file?
thanks in advance
you can retrieve timestamp hadoop ls command , parse using awk.there pattern file/directory time stamp. file
permissions number_of_replicas userid groupid filesize modification_date modification_time filename and directory
permissions userid groupid modification_date modification_time dirname 6th , 7th field file gives modification date , time. can use below sample retrieving information.
hadoop fs -ls /textfile | awk '{timestamp= $6 " " $7;print timestamp}' refer documentation ls command.
http://hadoop.apache.org/docs/r2.7.0/hadoop-project-dist/hadoop-common/filesystemshell.html hope help.
Comments
Post a Comment