- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Behaviour of "tail -f"
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2000 05:30 AM
10-17-2000 05:30 AM
Behaviour of "tail -f"
If a "tail -f" is running on a file and the file is renamed using mv, what will happen to the tail process? Will the process remain on the system indefinitely or will it eventually be killed?
Any help would be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2000 05:35 AM
10-17-2000 05:35 AM
Re: Behaviour of "tail -f"
Tail will continue to read the 'moved' file and will remain forever until killed. The man pages mention an endless loop.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2000 06:02 AM
10-17-2000 06:02 AM
Re: Behaviour of "tail -f"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2000 09:12 AM
10-17-2000 09:12 AM
Re: Behaviour of "tail -f"
Youd be watching an endless loop that would be the moved file.
Demo:
First window:
alphard:..adm/syslog>cat syslog.log >>titi
alphard:..adm/syslog>mv titi tutu
alphard:..adm/syslog>ll
total 2812
-rw-r--r-- 1 root root 10729 Oct 13 20:29 OLDsyslog.log
-r--r--r-- 1 root root 1307538 Oct 15 15:37 mail.log
-rw-r--r-- 1 root root 14729 Oct 17 11:33 syslog.log
-rw-rw-rw- 1 root sys 17346 Oct 17 19:07 tutu
alphard:..adm/syslog>date >> tutu
alphard:..adm/syslog>date >> tutu
alphard:..adm/syslog>date >> tutu
alphard:..adm/syslog>
2nd window:
119537667 -a
Oct 16 09:14:52 alphard ftpd[2603]: FTP LOGIN FROM 160.53.92.88 [160.53.92.88], patrol
Oct 16 09:35:06 alphard ftpd[2603]: exiting on signal 14
Oct 16 18:57:29 alphard : su : + ttyp4 vbe-logadm
Oct 16 19:11:51 alphard : su : + ta oracle-root
Oct 16 19:18:16 alphard : su : + ta oracle-dbatrd2
Oct 16 19:26:49 alphard : su : + ta oracle-root
Oct 17 11:33:41 alphard bootpd[28558]: bootpd 2.4 #1.17.112.7: Wed Apr 14 05:09:15 GMT 1999
Oct 17 11:33:42 alphard bootpd[28558]: reading "/etc/bootptab"
Oct 17 11:33:42 alphard bootpd[28558]: read 2 entries from "/etc/bootptab"
Tue Oct 17 19:07:52 METDST 2000
Tue Oct 17 19:07:58 METDST 2000
Tue Oct 17 19:08:01 METDST 2000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2000 10:23 PM
10-17-2000 10:23 PM
Re: Behaviour of "tail -f"
If you move the file to another logical volume the inode changes and from that moment on you won't see any new additions with tail !
So if you move on the SAME logical volume you will see new additions to the file because the inode-number hasn't changed, but if you move to another logical volume the inode-number changes and then you have to kill the 'tail -f' and issue a new 'tail -f' of the new file.
Hope this explains a little bit more,