Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

tailfile logfile formant WD-YYYYMMDD.log

avatar

Hello experts,

I am trying to copy the files being written using tailfile-> putfile. Format of files are below.

WD-YYYYMMDD.log

At any point of time latest file will be get written(ex. WD-20160908.log) and next it will be switched to new date (ex. WD-20160909.log)and that file start getting written.

File to tail : /root/wd/log1/WD-20160831.log

Rolling FileName Pattern: WD-*.log

State of file:

Initial start position: Beginning of File

File location : local

Results are not looks correct. Please suggested.

At source :

[root@server1 log1]# cat > WD-20160830.log
1
2
3
^C
[root@server1 log1]# cat >> WD-20160831.log
4
5
6
^C
[root@server1 log1]# ls -ltr
total 8
-rw-r--r--. 1 root root 6 Sep  9 00:53 WD-20160830.log
-rw-r--r--. 1 root root 6 Sep  9 00:54 WD-20160831.log


At target:


[root@server1 log2]# ls -tlr
total 12
-rw-r--r--. 1 nifi hadoop 2 Sep  9 00:53 WD-20160830.log
-rw-r--r--. 1 nifi hadoop 4 Sep  9 00:54 WD-20160831.0-4.log
-rw-r--r--. 1 nifi hadoop 2 Sep  9 00:54 WD-20160831.4-6.log
[root@*****log2]# cat WD-20160830.log
1
[root@server1 log2]# cat WD-20160831.0-4.log
4
5
[root@server1 log2]# cat WD-20160831.4-6.log
6

1 ACCEPTED SOLUTION

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
1 REPLY 1

avatar
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login