From 4ca8449c2826be469bc9558f2a037236c6703d64 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Tue, 13 Oct 2020 20:27:48 +0000 Subject: sg_dd: add oflag=nocreat and conv=nocreat : OFILE must exist; similar in testing sgh_dd+sg_mrq_dd git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@865 6180dd3e-e324-4e3e-922d-17de1ae2f315 --- doc/sg_dd.8 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/sg_dd.8') diff --git a/doc/sg_dd.8 b/doc/sg_dd.8 index 90d707bc..b2d45874 100644 --- a/doc/sg_dd.8 +++ b/doc/sg_dd.8 @@ -242,6 +242,10 @@ traditional dd conversions (e.g. ASCII to EBCDIC). Recently added conversions overlap somewhat with the flags so some conversions are now supported by sg_dd. .TP +nocreat +this conversion has the same effect as "oflag=nocreat", namely: \fIOFILE\fR +must exist, it will not be created. +.TP noerror this conversion is very close to "iflag=coe" and is treated as such. See the "coe" flag. Note that an error on \fIOFILE\fR will stop the copy. @@ -352,6 +356,16 @@ nocache use posix_fadvise() to advise corresponding file there is no need to fill the file buffer with recently read or written blocks. .TP +nocreat +this flag is only active in \fIoflag=FLAGS\fR. If present then \fIOFILE\fR +will be opened if it exists. If \fIOFILE\fR doesn't exist then an error +is generated. Without this flag a regular (empty) file named \fIOFILE\fR +will be created (and then filled). For production quality scripts where +\fIOFILE\fR is a device node (e.g. '/dev/sdc') this flag is recommended. +It guards against the remote possibility of 'dev/sdc' disappearing +temporarily (e.g. a USB memory key removed) resulting in a large regular +file called '/dev/sdc' being created. +.TP null has no affect, just a placeholder. .TP -- cgit v1.2.3