Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Nov 2019 16:27:16 +0700
From:      Victor Sudakov <vas@sibptus.ru>
To:        freebsd-questions@freebsd.org
Subject:   Re: grep for ascii nul
Message-ID:  <20191101092716.GA67658@admin.sibptus.ru>
In-Reply-To: <2c08387c-425b-060d-4f9b-3443a3f6a18f@irk.ru>
References:  <20191101024817.GA60134@admin.sibptus.ru> <2c08387c-425b-060d-4f9b-3443a3f6a18f@irk.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sorry for the confusion. Of cource I meant files with ascii nul in file
contents, inside. Because why would I have mentioned "grep"?

I need to find files containing ascii null inside, and print their names to=
 stdout.


thor wrote:
> There is NO such thing as filenames containing 0x00 inside the filename.=
=20
> UNIX filenames are strings in C meaning and may contain any 8-bit values=
=20
> except "/" which delimits the subdirectory names and 0x00 which marks=20
> the end of filename string.
>=20
> At least it was so when I first met Unix, and I hope Bill Gates never=20
> influenced Unix since this time.
>=20
> On 11/01/19 10:48, Victor Sudakov wrote:
> > Dear Colleagues,
> >
> > How can I print the names of files containing ascii nul (\x0)? The
> > FreeBSD "grep -l" does not seem to be able to do it.
> >
> > NB I don't need to delete the nul character with sed or tr, just need to
> > find files containing it.
> >
>=20
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"

--=20
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

--AhhlLboLdkugWU4S
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJdu/p0AAoJEA2k8lmbXsY0DuIH/2mMXEgB5gkWNzqapXfFLVtd
43KBww3GsDYHg9r0F6WNAnnA2LVRI+pzgX0RWur3rLz/sewLstVQAWql4mw4Ue4P
LBQpqZZXZT+YX5iR686VOpc/cO8p1DRN9vJqw5mMxXjrmbjekUX+muK1RProjQ+S
z62aaSbWksVXoi81mda4ffqHwpm2kwQ6EukXXzGNhNkDp+k6u6K5F9+xB149ZZg2
vrKMrDmvBoQrEnqKM1HUG2+CXRoKwQ0fk9JsYiYOO6Puu/0BfMgWmcKIeAHP/y4p
w08EquQjyzpl+NYgSoCmTch9Fm1Tf3rNDW0C7J25hFF9+sUBAQIi8THriLUyZgQ=
=B//2
-----END PGP SIGNATURE-----

--AhhlLboLdkugWU4S--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191101092716.GA67658>