3 ms·
Could you (or anyone who understands) explain what these do?
by sundarurfriend 5y ago
Could you (or anyone who understands) explain what these do?
- Alekhine 5y agoIt 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.
- _bohm 5y ago`tail -f` follows the logfile, so the command allows you to search over the logfile as logs are being added to it
- fulafel 5y agotail -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.