Which Bash option prevents a user from accidentally overwriting a file with a ">"?

Which Bash option prevents a user from accidentally overwriting a file with a “>”?

Which Bash option prevents a user from accidentally overwriting a file with a “>”?

A.
set -o safe

B.
set -o noglob

C.
set -o noclobber

D.
set -o append

E.
set -o nooverwrite

Explanation:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


BrianTzBo

BrianTzBo

Wrot the exam on the 5th of FEB 2016, the questions are valid i passed with a score of 750…thank you for your assistance teskKings

peanuttech

peanuttech

set -o no clobber

In software engineering, clobbering a file or computer memory is overwriting its contents.

$ set -o noclobber
$ echo “Can we overwrite it again?” >file.txt
-bash: file.txt: cannot overwrite existing file

source: https://en.wikipedia.org/wiki/Clobbering