mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-15 06:48:43 +00:00
Update cheatsheets
This commit is contained in:
@@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Continuously watch a specific file for events without exiting:
|
||||
|
||||
`inotifywait --monitor {{path/to/file}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{path/to/file}}`
|
||||
|
||||
- Watch a directory recursively for events:
|
||||
|
||||
`inotifywait --monitor --recursive {{path/to/directory}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} {{path/to/directory}}`
|
||||
|
||||
- Watch a directory for changes, excluding files, whose names match a regular expression:
|
||||
|
||||
`inotifywait --monitor --recursive --exclude "{{regular_expression}}" {{path/to/directory}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} --exclude "{{regular_expression}}" {{path/to/directory}}`
|
||||
|
||||
- Watch a file for changes, exiting when no event occurs for 30 seconds:
|
||||
|
||||
`inotifywait --monitor --timeout {{30}} {{path/to/file}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-t|--timeout]}} {{30}} {{path/to/file}}`
|
||||
|
||||
- Only watch a file for file modification events:
|
||||
|
||||
`inotifywait --event {{modify}} {{path/to/file}}`
|
||||
`inotifywait {{[-e|--event]}} {{modify}} {{path/to/file}}`
|
||||
|
||||
- Watch a file printing only events, and no status messages:
|
||||
|
||||
`inotifywait --quiet {{path/to/file}}`
|
||||
`inotifywait {{[-q|--quiet]}} {{path/to/file}}`
|
||||
|
||||
- Run a command when a file is accessed:
|
||||
|
||||
`inotifywait --event {{access}} {{path/to/file}} && {{command}}`
|
||||
`inotifywait {{[-e|--event]}} {{access}} {{path/to/file}} && {{command}}`
|
||||
|
||||
Reference in New Issue
Block a user