Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I use tail to monitor the progress of jobs that I know will write their progress to disk. Almost always, I know which file they will create before they start running (the jobs are dispatched by a scheduler on a supercomputer)

Is there a way to tail these files before they are created? I would like to do so while avoiding race conditions and/or making assumptions about how or when the jobs write to disk.

share|improve this question

1 Answer

up vote 9 down vote accepted

Use the -F flag to tail (assuming you have tail from GNU coreutils):

tail -F file-that-does-not-exist
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.