From owner-freebsd-questions@FreeBSD.ORG Mon Jul 18 08:45:50 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30E78106564A for ; Mon, 18 Jul 2011 08:45:49 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id E88818FC15 for ; Mon, 18 Jul 2011 08:45:48 +0000 (UTC) Received: from r55.edvax.de (port-92-195-103-124.dynamic.qsc.de [92.195.103.124]) by mx02.qsc.de (Postfix) with ESMTP id 042871D9F0; Mon, 18 Jul 2011 10:45:46 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p6I8jjcb001783; Mon, 18 Jul 2011 10:45:45 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 18 Jul 2011 10:45:45 +0200 From: Polytropon To: Frank Bonnet Message-Id: <20110718104545.2aacbd1b.freebsd@edvax.de> In-Reply-To: <4E23F0FE.3070305@esiee.fr> References: <4E23E6DD.6050901@esiee.fr> <20110718101029.531397d9.freebsd@edvax.de> <4E23F0FE.3070305@esiee.fr> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Tools to find "unlegal" files ( videos , music etc ) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 08:45:50 -0000 On Mon, 18 Jul 2011 10:38:22 +0200, Frank Bonnet wrote: > On 07/18/2011 10:10 AM, Polytropon wrote: > > On Mon, 18 Jul 2011 09:55:09 +0200, Frank Bonnet wrote: > >> Hello > >> > >> Anyone knows an utility that I could pipe to the "find" command > >> in order to detect video, music, games ... etc files ? > >> > >> I need a tool that could "inspect" inside files because many users > >> rename those filename to "inoffensive" ones :-) > > One way could be to define a list of file extensions that > > commonly matches the content you want to track. Of course, > > the file name does not directly correspond to the content, > > but it often gives a good hint to search for *.wmv, *.flv, > > *.avi, *.mp(e)g, *.mp3, *.wma, *.exe - and of course all > > the variations of the extensions with uppercase letters. > > Also consider *.rar and maybe *.zip for compressed content. > > > > If file extensions have been manipulated (rare case), the > > "file" command can still identify the correct file type. > > > > > > > > > yes thanks , gonna try with the file command You could make a simple script that lists "file" output for all files (just to be sure because of possible suffix renaming) for further inspection. Sometimes, you can also run "strings" for a given file - maybe that can be used to identify typical suspicious string patters for a "strings + grep" combination so less manual identification has to be done. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...