[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190704222906.f817d02cb248561edd84a669@linux-foundation.org>
Date: Thu, 4 Jul 2019 22:29:06 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Joe Perches <joe@...ches.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Randy Dunlap <rdunlap@...radead.org>,
Mark Brown <broonie@...nel.org>, linux-fsdevel@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-mm@...ck.org,
Linux-Next Mailing List <linux-next@...r.kernel.org>,
mhocko@...e.cz, mm-commits@...r.kernel.org,
Michal Wajdeczko <michal.wajdeczko@...el.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Intel Graphics <intel-gfx@...ts.freedesktop.org>,
DRI <dri-devel@...ts.freedesktop.org>,
Chris Wilson <chris@...is-wilson.co.uk>
Subject: Re: mmotm 2019-07-04-15-01 uploaded (gpu/drm/i915/oa/)
On Thu, 04 Jul 2019 22:22:41 -0700 Joe Perches <joe@...ches.com> 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.
Powered by blists - more mailing lists