I have a program that is downloading some images into a folder. I want to count the number of images in the folder currently. I used a command like
ls -1 download_folder | wc -l.
But this command takes a lot of time to run(since I have already downloaded a lot of images). While this command is running, my downloader keeps on downloading the images.
And finally, my command returns the count. I wanted to know, from what timestamp this count is. Is it from the instant I started running the command or it gives the current latest count?
Edit: I tried validating for myself, but could not find any way. Thanks.