Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could you (or anyone who understands) explain what these do?


tail -f will hang around and output new lines that appear in the file.

fzf will receive that input and in this case accumulate the new lines that have come in from tail -f. It will then stay around, present an interactive full screen text ui, and let you interactively filter the set of received lines based on substrings you enter at the fzf prompt. This while continuously incorporating new log lines coming from the pipe, from tail -f. The +s just says not to sort the lines, keeping the matches in the same order they appeared in the logs.


It just takes the last ten lines of a log file, then passes that input to a program that basically lets you search each line. I don't really see the usefulness.

Edit: Ah, I see. According to another comment you see the output of the file as it changes.


`tail -f` follows the logfile, so the command allows you to search over the logfile as logs are being added to it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: