PrepAway - Latest Free Exam Questions & Answers

What BASH environment variable will prevent you from overwriting a file with a “>” or “&g

What BASH environment variable will prevent you from overwriting a file with a ">" or ">>"?

A.
set -o safe

B.
set -o noglob

C.
set -o noclobber

D.
set -o append

E.
set -o nooverwrite

Explanation/Reference:
From the man pages:
-o noclobber, -C   If set, bash does not overwrite an existing file with the >, >&, and <> redirection operators. This may be overridden when creating output files by using the redirection operator >| instead of >


Leave a Reply