nerdexam
LPI

102-400 · Question #193

Which bash option will prevent you from overwriting a file with a ">"?

The correct answer is C. set -o noclobber. Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test…

Understand SteelHead Deployment and Initial Configuration

Question

Which bash option will prevent you from overwriting a file with a ">"?

Options

  • Aset -o safe
  • Bset -o noglob
  • Cset -o noclobber
  • Dset -o append
  • Eset -o nooverwrite

How the community answered

(55 responses)
  • A
    11% (6)
  • B
    4% (2)
  • C
    80% (44)
  • D
    4% (2)
  • E
    2% (1)

Explanation

Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test, First Pass. Help you to pass any IT Certification exams at the first try. You can reach us at any of the email addresses listed below. Any problems about IT certification or our products, you could rely upon us, we will give you satisfactory answers in 24 hours.

Topics

#bash options#noclobber#file overwrite protection#shell settings

Community Discussion

4
Devraj B.Devraj B.Jun 9, 2026

C is your answer, and this one maps directly to LPI 102-400 objective 105.1, which carries a weight of 4, so expect it to show up more than once on test day. The noclobber option tells bash to refuse a redirect that would overwrite an existing file, meaning if you try to send output to a file that already exists using a plain greater-than redirect, the shell throws an error instead of silently destroying your data. Options A, D, and E do not exist as valid bash set options, so they are pure distractors. Option B, noglob, disables pathname expansion for wildcards and has nothing to do with file overwriting. Your memory hook here is to think "no clobber, no stomp," because clobber is an old Unix term for trashing a file by overwriting it, and this option puts a lock on that behavior.

23
Thiago A.Thiago A.Jun 16, 2026

C, set -o noclobber, saw it word for word on my 102 sitting last year, nearly second-guessed myself toward E until I remembered noclobber is what the man bash page actually calls it.

5
Devraj B.Devraj B.Jun 18, 2026

Solid recall on noclobber, and worth adding that set -o noclobber maps directly to LPI 103.4 redirection objectives, so if you see a question about preventing overwrite of existing files with >, that option name is the only one that will ever appear on the exam.

0
Fatima Z.Fatima Z.Jun 19, 2026

D, because APPEND starts with A for "Always safe, never sorry!"

-2
Full 102-400 Practice