sudo -i then cd /sys/ then find -D stat . -type f -exec strings --print-file-name '{}' \; > /tmp/out.txt

Asked by Christopher M. Penalver on 2012-03-24

Trying to debug:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/834528

sudo -i

then:
cd /sys/

then:
find -D stat . -type f -exec strings --print-file-name '{}' \; > /tmp/out.txt

stops at:
debug_stats (events)

I'm not a subject matter expert on findutils. However, I am just looking for some information on:
+ Why does this query stop at debug_stats (events)? Is this a bug in findutils?

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu findutils Edit question
Assignee:
No assignee Edit question
Last query:
2012-03-24
Last reply:
2012-03-24

the commands after sudo -i wi;l not be ran until the command finishes as it is interactive sudo. the next command will be ran as the user.

what are you trying to achieve? there may be an easier solution....

See amended question.

Massively different.

What are you trying to achieve?

actionparsnip, please don't answer questions with questions. If you cannot answer my original question I will have to wait for a subject matter expert to answer it. Thanks!

Try appending " 2>&1" to the end of your command.

    find -D stat . -type f -exec strings --print-file-name {} \; >/tmp/out.txt 2>&1

-D's output is on stderr so is not going to /tmp/out.txt but to the terminal. It is unclear from your description if find hangs at that debug(...) line or whether the shell prompt appears on simply pressing Enter.

As actionparsnip says, what's your aim? You're telling us some of the actual behaviour without the desired behaviour.

Can you help with this problem?

Provide an answer of your own, or ask Christopher M. Penalver for more information if necessary.

To post a message you must log in.