tail -f bar/somefile.logจะล้มเหลวทันทีเมื่อ somefile.log ไม่มีอยู่ ฉันจะทำให้ท้ายได้อย่างไม่มีกำหนดรอให้สร้างไฟล์นั้น (ซึ่งจะเกิดขึ้นในไม่กี่นาที)?
ปรับปรุง: ใช้-Fฉันเห็น:
tail: cannot open `bar/somefile.log' for reading: No such file or directory
tail: cannot watch parent directory of `bar/somefile.log': No such file or directory
เพราะbarยังไม่มีอยู่ (จะถูกสร้างขึ้นในอีกสักครู่) เมื่อbarถูกสร้างขึ้นและsomefile.logถูกสัมผัสหางไม่ได้รับการเปลี่ยนแปลงเลย