-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## fstail | ||
|
||
Unfortunately, `tail -f /logs/*` may not do what you want it to do. | ||
|
||
Bash will expand `*` to all existing files within `/logs/` and then show the extra lines added to each of them. | ||
|
||
**What if you want to include newly created files too?** | ||
|
||
`fstail` uses the fsnotify mechanism to detect both new and existing files, then starts printing their contents as and when they are written to. | ||
|
||
### Usage | ||
|
||
Tail the current directory: | ||
|
||
``` | ||
cd /var/log/ | ||
fstail | ||
``` | ||
|
||
Tail files in a given directory: | ||
|
||
``` | ||
/var/log/nginx/ | ||
``` | ||
|
||
## License | ||
|
||
Copyright Alex Ellis 2023 | ||
|
||
MIT license. |