Skip to content

Can solve the problem of file scrolling in Linux? #186

@hz-kelpie

Description

@hz-kelpie

like the file'/root/.bash_history'

when my '/root/.bash_history' start roll

root@kelpie-btf:~# wc -l /root/.bash_history 

2000 /root/.bash_history

root@kelpie-btf:~# echo $HISTSIZE

1000

this util work abnormal ,but "tail -f /root/.bash_history " can still work

this is my config

t, err := tail.TailFile(p, tail.Config{
	Location: &tail.SeekInfo{
		Offset: 0,
		Whence: io.SeekEnd,
	},
	ReOpen:      true,
	Follow:      true,
	Poll:        true,
	MustExist:   false,
	Pipe:        false,
	MaxLineSize: 10000
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions