unix stat command trailing zeros after seconds -
how can remove many zeros (0000000 +0000) after seconds in output stat command in unix
filetime=$(stat --format=%y filename.txt) echo $filetime 2016-01-27 15:03:26.000000000 +0000
try size
filetime=$(stat --format=%y filename.txt | sed 's/.000000000//') echo $filetime 2016-01-27 15:03:26 +0000
Comments
Post a Comment