I tried the options:
ls -lrt | awk '{ f=$NF }; END{ print f }'
and
ls -t1 | head -n1
But the last file copied to the folder is not shown. What other options are there?
UPD: Option does not work either:
ls -t1 | tail -n1
All these commands always give out one single file name for my folder. Although the files continue to continuously flow into the folder. What is needed is the last file in the folder. It does not have to be the newest file.
tail -f
) - alexlz