checking file size

ساخت وبلاگ
I have a sh script that runs a few different python scripts, this is executed from a cron job.

after script 1 runs, i want to verify the file size of one of the files in the directory (that was built with script 1). if that file size is greater than 0 script 2 can run.
If not script 2 should not run.

any ideas how to do this ?

I can get file size with

os.stat('/var/www/html/test/test.csv').st_size==0

that retus a Falso if size is greater than 0, not sure how to go about doing the rest.
CodingForums...
ما را در سایت CodingForums دنبال می کنید

برچسب : نویسنده : codingforums بازدید : 150 تاريخ : جمعه 7 مهر 1396 ساعت: 10:54