From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: mmotm 2019-07-04-15-01 uploaded (gpu/drm/i915/oa/) Date: Thu, 4 Jul 2019 22:29:06 -0700 Message-ID: <20190704222906.f817d02cb248561edd84a669@linux-foundation.org> References: <20190704220152.1bF4q6uyw%akpm@linux-foundation.org> <80bf2204-558a-6d3f-c493-bf17b891fc8a@infradead.org> <20190705131435.58c2be19@canb.auug.org.au> <20190704220931.f1bd2462907901f9e7aca686@linux-foundation.org> <5f4680cce78573ecfbbdc0dfca489710581b966f.camel@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5f4680cce78573ecfbbdc0dfca489710581b966f.camel@perches.com> Sender: linux-kernel-owner@vger.kernel.org To: Joe Perches Cc: Stephen Rothwell , Masahiro Yamada , Randy Dunlap , Mark Brown , linux-fsdevel@vger.kernel.org, Linux Kernel Mailing List , linux-mm@kvack.org, Linux-Next Mailing List , mhocko@suse.cz, mm-commits@vger.kernel.org, Michal Wajdeczko , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Intel Graphics , DRI , Chris Wilson List-Id: dri-devel@lists.freedesktop.org On Thu, 04 Jul 2019 22:22:41 -0700 Joe Perches wrote: > > So when comparing a zero-length file with a non-existent file, diff > > produces no output. > > Why use the -N option ? > > $ diff --help > [...] > -N, --new-file treat absent files as empty > > otherwise > > $ cd $(mktemp -d -p .) > $ touch x > $ diff -u x y > diff: y: No such file or directory Without -N diff fails and exits with an error. -N does what's desired as long as the non-missing file isn't empty.