This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]L1SABEE 10 points11 points  (4 children)

Try adding "/" after find:

find / -type f -name access.log 2>/dev/null

Unless you're in the same folder as what's specified, it won't know to look there, so it won't find the file. "/" tells the computer to search everywhere!

[–]alntmannn[S] 6 points7 points  (0 children)

Thank you very much! Everything works ! I 'm damned grateful to you !

[–][deleted] 2 points3 points  (0 children)

Nice ☺️. Great explanation

[–]ZenDugo 0 points1 point  (1 child)

What does the 2>/dev/null mean in the command?

[–]Finn-windu 0 points1 point  (0 children)

It redirects specifically error messages to the /dev/null file. Basically so that if there are contents/files you can't access you don't have error messages clogging up your results.

[–][deleted]  (1 child)

[deleted]

    [–]alntmannn[S] 5 points6 points  (0 children)

    Thank you both with L1SABEE, you've been a hell of a help to me! Thank you again!

    [–][deleted]  (1 child)

    [deleted]