I have daily incoming files in a local folder(/home/gas_uk). I want to put/copy the latest files from local for today to the HDFS directory (/apps/hive/warehouse/gas_uk/). I have tried :
find /home/gas_uk -type f -print0 | xargs -0 stat --format '%Y :%y %n' | sort -nr | cut -d ' ' -f5 | cut -d '/' -f7 | head
to find latest file but due to spaces in the name of file (eg:20191010_voice file cover.csv) I am unable to find the list.