Skip to content

Instantly share code, notes, and snippets.

@JonTheNiceGuy
Created June 29, 2021 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonTheNiceGuy/3072d5ab9f71e9c0be78a956d7d47b17 to your computer and use it in GitHub Desktop.
Save JonTheNiceGuy/3072d5ab9f71e9c0be78a956d7d47b17 to your computer and use it in GitHub Desktop.
/---------------------------------------------------- Read the following file. Usually just the last 10 characters, but options
| follow.
| /---------------------------------------------- Follow the file, without stopping when it gets to the end of the "defined"
| | size to read.
| | /------------------------------------------- Define the number of lines to read.
| | | /----------------------------------------- Don't read any lines (-n 0) In this case because you might be following
| | | | binary files!
| | | | /--------------------------------------- $() executes the comand within the braces, and uses "STDOUT" as this value.
| | | | | /------------------------------------- Find lists all the files (or directories) which match the criteria.
| | | | | | /-------------------------------- The path to look for files in. All files will have this prefix.
| | | | | | | /---------------------- Look this many subdirectories deep.
| | | | | | | | /------------- Look one subdirectory deep (-maxdepth 1).
| | | | | | | | | /---------- What kind of objects are we looking for?
| | | | | | | | | | /----- Only files! (-type f)
tail -f -n 0 $(find /var/log -maxdepth 1 -type f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment