Add more info on 2>/dev/null

This commit is contained in:
lucky-vers 2023-10-21 21:59:37 +05:30
parent 6134cba9dc
commit 983abc694f

View file

@ -206,7 +206,7 @@ find / -size 33c -user bandit7 -group bandit6 2>/dev/null
- `/` tells find that we want to search the entire filesystem, i.e. the root directory, for the file.
- `-size 33c` means the file's size has to be exactly 33 bytes long.
- `-user bandit7` and `-group bandit6` filter for only those files owned by user bandit7 and group bandit6, respectively.
- `2>/dev/null` removes any error messages that might show up while running the command, e.g. `permission denied` errors.
- `2>/dev/null` removes any error messages that might show up while running the command, e.g. `permission denied` errors. `2` is the indicator for the error stream `stderr`, and `>/dev/null` means we are redirecting it to the null device, i.e. discarding its output.
The result of the command is
```