diff --git a/docs/docs/advanced/caching-events.md b/docs/docs/advanced/caching-events.md index b36c81bc072a..a431faf2110b 100644 --- a/docs/docs/advanced/caching-events.md +++ b/docs/docs/advanced/caching-events.md @@ -3,11 +3,9 @@ Tracee has an events caching (in-memory) mechanism. In order to check latest caching options you may execute: - - - +```console +./dist/tracee man cache +``` diff --git a/docs/docs/advanced/dropping-capabilities.md b/docs/docs/advanced/dropping-capabilities.md index eb9a247a8b5b..10c50e2392b8 100644 --- a/docs/docs/advanced/dropping-capabilities.md +++ b/docs/docs/advanced/dropping-capabilities.md @@ -49,12 +49,9 @@ does is through different "execution protection rings": You may see all available capabilities in the running environment by running: - - - -command line flag. +```console +capsh --print +``` ## Bypass capabilities dropping feature diff --git a/docs/docs/advanced/forensics.md b/docs/docs/advanced/forensics.md index ebf950e3358a..24391b3cad30 100644 --- a/docs/docs/advanced/forensics.md +++ b/docs/docs/advanced/forensics.md @@ -3,12 +3,9 @@ Tracee has a unique feature that lets you capture interesting artifacts from running applications, using the `--capture` flag. - - - - +```console +./dist/tracee man capture +``` ```console sudo ./dist/tracee --capture xxx diff --git a/pkg/cmd/flags/capture.go b/pkg/cmd/flags/capture.go index 178bcabd210a..6807a458a23b 100644 --- a/pkg/cmd/flags/capture.go +++ b/pkg/cmd/flags/capture.go @@ -190,9 +190,7 @@ func PrepareCapture(captureSlice []string, newBinary bool) (config.CaptureConfig } } else { if newBinary { - // TODO: build man page - // return config.CaptureConfig{}, errfmt.Errorf("invalid capture option specified, see 'tracee-capture' man page for more info") - return config.CaptureConfig{}, errfmt.Errorf("invalid capture option specified, use '--help' for more info") + return config.CaptureConfig{}, errfmt.Errorf("invalid capture option specified, run 'man capture' for more info") } return config.CaptureConfig{}, errfmt.Errorf("invalid capture option specified, use '--capture help' for more info") diff --git a/pkg/cmd/flags/errors.go b/pkg/cmd/flags/errors.go index 1961427cb6ab..de916b32ac75 100644 --- a/pkg/cmd/flags/errors.go +++ b/pkg/cmd/flags/errors.go @@ -14,9 +14,7 @@ func InvalidEventExcludeError(event string) error { func InvalidScopeOptionError(expr string, newBinary bool) error { if newBinary { - // TODO: build man page - // return fmt.Errorf("invalid scope option specified (%s), see 'tracee-scope' man page for more info", expr) - return fmt.Errorf("invalid scope option specified (%s), use '--help' for more info", expr) + return fmt.Errorf("invalid scope option specified (%s), run 'man scope' for more info", expr) } return fmt.Errorf("invalid scope option specified (%s), use '--scope help' for more info", expr) diff --git a/pkg/cmd/flags/logger.go b/pkg/cmd/flags/logger.go index 9610374d99b1..d95c8d295253 100644 --- a/pkg/cmd/flags/logger.go +++ b/pkg/cmd/flags/logger.go @@ -50,9 +50,7 @@ func invalidLogOption(err error, opt string, newBinary bool) error { } if newBinary { - // TODO: build man page - // return errfmt.Errorf("invalid log option: %s, %s, see 'tracee-log' man page for more info", opt, err) - return errfmt.Errorf("invalid log option: %s, %s, use '--help' for more info", opt, err) + return errfmt.Errorf("invalid log option: %s, %s, run 'man log' for more info", opt, err) } return errfmt.Errorf("invalid log option: %s, %s, use '--log help' for more info", opt, err) @@ -65,8 +63,6 @@ func invalidLogOptionValue(err error, opt string, newBinary bool) error { } if newBinary { - // TODO: build man page - // return errfmt.Errorf("invalid log option value: %s, %s, see 'tracee-log' man page for more info", opt, err) return errfmt.Errorf("invalid log option value: %s, %s, use '--help' for more info", opt, err) } diff --git a/pkg/cmd/flags/output.go b/pkg/cmd/flags/output.go index 6a09b901726a..b9242920d8af 100644 --- a/pkg/cmd/flags/output.go +++ b/pkg/cmd/flags/output.go @@ -39,9 +39,7 @@ func PrepareOutput(outputSlice []string, newBinary bool) (PrepareOutputResult, e case "none": if len(outputParts) > 1 { if newBinary { - // TODO: build man page - // return outConfig, errors.New("none output does not support path. See 'tracee-output' man page for more info") - return outConfig, errors.New("none output does not support path. Use '--help' for more info") + return outConfig, errors.New("none output does not support path. Run 'man output' for more info") } return outConfig, errors.New("none output does not support path. Use '--output help' for more info") @@ -73,9 +71,7 @@ func PrepareOutput(outputSlice []string, newBinary bool) (PrepareOutputResult, e } default: if newBinary { - // TODO: build man page - // return outConfig, fmt.Errorf("invalid output flag: %s, see 'tracee-output' man page for more info", outputParts[0]) - return outConfig, fmt.Errorf("invalid output flag: %s, use '--help' for more info", outputParts[0]) + return outConfig, fmt.Errorf("invalid output flag: %s, run 'man output' for more info", outputParts[0]) } return outConfig, fmt.Errorf("invalid output flag: %s, use '--output help' for more info", outputParts[0]) @@ -118,9 +114,7 @@ func setOption(cfg *config.OutputConfig, option string, newBinary bool) error { cfg.EventsSorting = true default: if newBinary { - // TODO: build man page - // return errfmt.Errorf("invalid output option: %s, see 'tracee-output' man page for more info", option) - return errfmt.Errorf("invalid output option: %s, use '--help' for more info", option) + return errfmt.Errorf("invalid output option: %s, run 'man output' for more info", option) } return errfmt.Errorf("invalid output option: %s, use '--output help' for more info", option) @@ -171,9 +165,7 @@ func parseFormat(outputParts []string, printerMap map[string]string, newBinary b for _, outPath := range strings.Split(outputParts[1], ",") { if outPath == "" { if newBinary { - // TODO: build man page - // return errfmt.Errorf("format flag can't be empty, see 'tracee-output' man page for more info") - return errfmt.Errorf("format flag can't be empty, use '--help' for more info") + return errfmt.Errorf("format flag can't be empty, run 'man output' for more info") } return errfmt.Errorf("format flag can't be empty, use '--output help' for more info") @@ -181,9 +173,7 @@ func parseFormat(outputParts []string, printerMap map[string]string, newBinary b if _, ok := printerMap[outPath]; ok { if newBinary { - // TODO: build man page - // return errfmt.Errorf("cannot use the same path for multiple outputs: %s, see 'tracee-output' man page for more info", outPath) - return errfmt.Errorf("cannot use the same path for multiple outputs: %s, use '--help' for more info", outPath) + return errfmt.Errorf("cannot use the same path for multiple outputs: %s, run 'man output' for more info", outPath) } return errfmt.Errorf("cannot use the same path for multiple outputs: %s, use '--output help' for more info", outPath) @@ -198,9 +188,7 @@ func parseFormat(outputParts []string, printerMap map[string]string, newBinary b func parseOption(outputParts []string, traceeConfig *config.OutputConfig, newBinary bool) error { if len(outputParts) == 1 || outputParts[1] == "" { if newBinary { - // TODO: build man page - // return errfmt.Errorf("option flag can't be empty, see 'tracee-output' man page for more info") - return errfmt.Errorf("option flag can't be empty, use '--help' for more info") + return errfmt.Errorf("option flag can't be empty, run 'man output' for more info") } return errfmt.Errorf("option flag can't be empty, use '--output help' for more info") @@ -240,9 +228,7 @@ func createFile(path string) (*os.File, error) { func validateURL(outputParts []string, flag string, newBinary bool) error { if len(outputParts) == 1 || outputParts[1] == "" { if newBinary { - // TODO: build man page - // return errfmt.Errorf("%s flag can't be empty, see 'tracee-output' man page for more info", flag) - return errfmt.Errorf("%s flag can't be empty, use '--help' for more info", flag) + return errfmt.Errorf("%s flag can't be empty, run 'man output' for more info", flag) } return errfmt.Errorf("%s flag can't be empty, use '--output help' for more info", flag) @@ -252,9 +238,7 @@ func validateURL(outputParts []string, flag string, newBinary bool) error { if err != nil { if newBinary { - // TODO: build man page - // return errfmt.Errorf("invalid uri for %s output %q. Use 'tracee-output' man page for more info", flag, outputParts[1]) - return errfmt.Errorf("invalid uri for %s output %q. Use '--help' for more info", flag, outputParts[1]) + return errfmt.Errorf("invalid uri for %s output %q. Run 'man output' for more info", flag, outputParts[1]) } return errfmt.Errorf("invalid uri for %s output %q. Use '--output help' for more info", flag, outputParts[1])