Is there a way to disable the delay of less +F?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Running less +F file
is very convenient because you can switch in and out of forward-forever mode with Ctrl-C and â§-F respectively.
Unfortunately new lines appear with a delay, which is very irritating when you are watching and comparing with something else.
tail -f
does not have this delay, but you can't easily switch out of forward-forever mode to scroll up or search or something.
Is there a way to combine the best of both?
tail less
add a comment |Â
up vote
1
down vote
favorite
Running less +F file
is very convenient because you can switch in and out of forward-forever mode with Ctrl-C and â§-F respectively.
Unfortunately new lines appear with a delay, which is very irritating when you are watching and comparing with something else.
tail -f
does not have this delay, but you can't easily switch out of forward-forever mode to scroll up or search or something.
Is there a way to combine the best of both?
tail less
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Running less +F file
is very convenient because you can switch in and out of forward-forever mode with Ctrl-C and â§-F respectively.
Unfortunately new lines appear with a delay, which is very irritating when you are watching and comparing with something else.
tail -f
does not have this delay, but you can't easily switch out of forward-forever mode to scroll up or search or something.
Is there a way to combine the best of both?
tail less
Running less +F file
is very convenient because you can switch in and out of forward-forever mode with Ctrl-C and â§-F respectively.
Unfortunately new lines appear with a delay, which is very irritating when you are watching and comparing with something else.
tail -f
does not have this delay, but you can't easily switch out of forward-forever mode to scroll up or search or something.
Is there a way to combine the best of both?
tail less
asked Nov 10 '17 at 10:10
AndreKR
304419
304419
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
The reason you're experiencing a delay when using less +F
is this (taken from this answer, which is so good I'll quote it verbatim):
less +F
reads the whole file, whereas on many systemstail -f
only reads the end of the file, and even on the systems where it does read the whole file, at least it doesn't keep the whole file in memory. That makesless +F
impractical for very large files. You can however runless -n +F
, which causes less to read only the end of the file, at the cost of not displaying number.
Under the hood, between
less -n +F
andtail -f
does, the main difference is thattail
uses a file change notification service on some platforms (e.g. inotify on Linux), which allows it to display new data instantly, whereasless
might take up to 1 second to display the new data because it checks for new data in a loop and sleeps between checks.
Thanks, I assumed you could just block on a read and you would be scheduled when new data arrives, but apparently you need a file system event. With this knowledge I looked up the code in tail and sent an email to Mark Nudelman.
â AndreKR
Nov 10 '17 at 11:09
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
The reason you're experiencing a delay when using less +F
is this (taken from this answer, which is so good I'll quote it verbatim):
less +F
reads the whole file, whereas on many systemstail -f
only reads the end of the file, and even on the systems where it does read the whole file, at least it doesn't keep the whole file in memory. That makesless +F
impractical for very large files. You can however runless -n +F
, which causes less to read only the end of the file, at the cost of not displaying number.
Under the hood, between
less -n +F
andtail -f
does, the main difference is thattail
uses a file change notification service on some platforms (e.g. inotify on Linux), which allows it to display new data instantly, whereasless
might take up to 1 second to display the new data because it checks for new data in a loop and sleeps between checks.
Thanks, I assumed you could just block on a read and you would be scheduled when new data arrives, but apparently you need a file system event. With this knowledge I looked up the code in tail and sent an email to Mark Nudelman.
â AndreKR
Nov 10 '17 at 11:09
add a comment |Â
up vote
3
down vote
The reason you're experiencing a delay when using less +F
is this (taken from this answer, which is so good I'll quote it verbatim):
less +F
reads the whole file, whereas on many systemstail -f
only reads the end of the file, and even on the systems where it does read the whole file, at least it doesn't keep the whole file in memory. That makesless +F
impractical for very large files. You can however runless -n +F
, which causes less to read only the end of the file, at the cost of not displaying number.
Under the hood, between
less -n +F
andtail -f
does, the main difference is thattail
uses a file change notification service on some platforms (e.g. inotify on Linux), which allows it to display new data instantly, whereasless
might take up to 1 second to display the new data because it checks for new data in a loop and sleeps between checks.
Thanks, I assumed you could just block on a read and you would be scheduled when new data arrives, but apparently you need a file system event. With this knowledge I looked up the code in tail and sent an email to Mark Nudelman.
â AndreKR
Nov 10 '17 at 11:09
add a comment |Â
up vote
3
down vote
up vote
3
down vote
The reason you're experiencing a delay when using less +F
is this (taken from this answer, which is so good I'll quote it verbatim):
less +F
reads the whole file, whereas on many systemstail -f
only reads the end of the file, and even on the systems where it does read the whole file, at least it doesn't keep the whole file in memory. That makesless +F
impractical for very large files. You can however runless -n +F
, which causes less to read only the end of the file, at the cost of not displaying number.
Under the hood, between
less -n +F
andtail -f
does, the main difference is thattail
uses a file change notification service on some platforms (e.g. inotify on Linux), which allows it to display new data instantly, whereasless
might take up to 1 second to display the new data because it checks for new data in a loop and sleeps between checks.
The reason you're experiencing a delay when using less +F
is this (taken from this answer, which is so good I'll quote it verbatim):
less +F
reads the whole file, whereas on many systemstail -f
only reads the end of the file, and even on the systems where it does read the whole file, at least it doesn't keep the whole file in memory. That makesless +F
impractical for very large files. You can however runless -n +F
, which causes less to read only the end of the file, at the cost of not displaying number.
Under the hood, between
less -n +F
andtail -f
does, the main difference is thattail
uses a file change notification service on some platforms (e.g. inotify on Linux), which allows it to display new data instantly, whereasless
might take up to 1 second to display the new data because it checks for new data in a loop and sleeps between checks.
answered Nov 10 '17 at 10:23
dr01
15.3k114769
15.3k114769
Thanks, I assumed you could just block on a read and you would be scheduled when new data arrives, but apparently you need a file system event. With this knowledge I looked up the code in tail and sent an email to Mark Nudelman.
â AndreKR
Nov 10 '17 at 11:09
add a comment |Â
Thanks, I assumed you could just block on a read and you would be scheduled when new data arrives, but apparently you need a file system event. With this knowledge I looked up the code in tail and sent an email to Mark Nudelman.
â AndreKR
Nov 10 '17 at 11:09
Thanks, I assumed you could just block on a read and you would be scheduled when new data arrives, but apparently you need a file system event. With this knowledge I looked up the code in tail and sent an email to Mark Nudelman.
â AndreKR
Nov 10 '17 at 11:09
Thanks, I assumed you could just block on a read and you would be scheduled when new data arrives, but apparently you need a file system event. With this knowledge I looked up the code in tail and sent an email to Mark Nudelman.
â AndreKR
Nov 10 '17 at 11:09
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f403723%2fis-there-a-way-to-disable-the-delay-of-less-f%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password