Skip to content

[Feature] Additional capture files besides stdout/stderr #58

@eatnumber1

Description

@eatnumber1

Consider the following command taken directly from the find.1 man page

Traversing the filesystem just once - for 2 different actions

  • Traverse the filesystem just once, listing set-user-ID files and directories into /root/suid.txt and large files into /root/big.txt.
$ find / \
    \( -perm -4000 -fprintf /root/suid.txt '%#m %u %p\n' \) , \
    \( -size +100M -fprintf /root/big.txt '%-10s %p\n' \)

This example uses the line-continuation character '\' on the first two lines to instruct the shell to continue reading the command on the next line.

Can this command be bkt'ed? I'm pretty sure not. The issue is that it affects files other than stdout/stderr, so future replays by bkt would not write to the files. Even if one of the files was /dev/stdout instead of /root/suid.txt, the other file would still not be affected.

If bkt gets a new feature, the ability to set files other than stdout/stderr as data to be captured + replayed, this could be made to work. Hypothetically, it could be e.g. bkt --output-file=/root/suid.txt --output-file=/root/big.txt --ttl=1h -- find ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions