Ghamura

Linux foundationsLesson 5 of 7

Finding files and secrets

Search a whole server for files by name and for text inside them.

0 of 5 tasks · about 11 min

  1. Step 1

    Find files by name

    find walks through directories and lists every file that matches what you ask for. The pattern is find WHERE TESTS:

    find /etc -name "*.conf"
    

    * means "any characters", so "*.conf" matches every name ending in .conf. Keep the quotes: without them the shell tries to expand the * itself before find sees it.

    List every .conf file under /etc.

    Do it in the terminal. This ticks itself off when you have.

4 more steps after this one

List every .conf file under /etc.
Practice lab for "Finding files and secrets". Type commands here and press Enter. Run help to list them.