Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] I have 146,000 files in lost+found. How do I sort them?
Date: Tue, 26 Sep 2006 04:15:58
1 On 9/25/06, Robert Persson <ireneshusband@×××××.com> wrote:
2 > If I can, how can I best sift through them? Is there a utility, or
3 > something I could drop into a simple bash script, that would look at the
4 > first few bytes of the file and, say, identify it as a jpeg or an xml
5 > file, so that it could be given an appropriate file extension, deleted
6 > or moved? Or is there one that could distinguish a text file from a
7 > binary?
9 sys-apps/file will give you the 'file' command, which does exactly this.
11 -Richard
12 --
13 gentoo-user@g.o mailing list