350-201 exam dumps

350-201 practice question 275 of 289

Cybersecurity Professional - Performing Cybersecurity Using Cisco Security Technologies. Professional level, Cisco. Free question with the correct answer and a full explanation.

350-201 Question 275

Single answer

During a cybersecurity investigation, you are analyzing a compromised Linux server. To locate a suspicious file named 'malware.sh' within the '/var/logs' directory and its subdirectories, which Bash command should you use?

  1. A

    find /var/logs -name malware.sh

  2. B

    ls /var/logs malware.sh

  3. C

    grep malware.sh /var/logs

  4. D

    cd /var/logs && locate malware.sh

Show answer and explanation

Correct answer: A

Explanation

The 'find' command is the most appropriate tool for searching files recursively in a directory structure. By specifying '/var/logs' as the starting directory and using the '-name' option with 'malware.sh', the command will locate the file if it exists in the specified directory or its subdirectories.

  • A. Correct.

    This command is correct. The 'find' command searches for files recursively within a given directory and its subdirectories, and the '-name' option specifies the name of the file to search for.

  • B. Incorrect.

    This command is incorrect. The 'ls' command lists files in a directory but does not perform a recursive search or locate files by name.

  • C. Incorrect.

    This command is incorrect. The 'grep' command is used to search for text patterns within files, not to locate files themselves.

  • D. Incorrect.

    This command is incorrect. The 'locate' command uses a pre-built database to find files but does not search dynamically for files in a specific directory structure. Additionally, the 'cd' part is unnecessary for this operation.

Timed practice exam

Take a 350-201 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam