Linux hates me!

I trying to get a USB webcam working and I found the advise to see webcamd.log. After far too long I came to the conclusion it doesn't exist.

Can somebody explain a way to unconditionally find a file if it exists?

I googled and found this syntax - find / -name "webcamd.log" which is supposed to search for that file from the root but it errors "Invalid argument". I even tried to find a file that does exist but same error.

BTW I'm using SSH from Putty on Win7 x64

I fear the only option is either sucide or introduce Pi to double glassing at high v

You can't find what doesn't exist.

"I even tried to find a file that does exist but same error". See above

Don't use quotes

Now that is exactly the sort of response I'd expect from Linux. Are you a Linux droid?

I was simply trying to point out that I'd already posted that I'd tried to find an existing file and had got the same result.

I believe

Don't use quotes

refers to the quotes in your command. The syntax which works is:

find / -name octoprint.log

Note that doing a find starting at the root of the filesystem will result is lots of Permission denied so you might want to sudo find / -name octoprint.log instead.

Whenever you're looking for a file promiscuously the best practice might be:

sudo / -name somefile 2> /dev/null

Errors related to system files then aren't displayed, making the results a little tighter.

1 Like

Oopsy, sorry 5ft24 (are you really 7 feet tall).

For reasons that I will never know OutsourcedGuru's

sudo find dir/ -name filename 2> /dev/null (without the quotes) works a treat.

1 Like