From owner-freebsd-ports@FreeBSD.ORG Fri Jan 6 10:56:47 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A950106566B for ; Fri, 6 Jan 2012 10:56:47 +0000 (UTC) (envelope-from ganael.laplanche@martymac.org) Received: from data.galacsys.net (webmail.galacsys.net [217.24.81.215]) by mx1.freebsd.org (Postfix) with ESMTP id D6CEB8FC0C for ; Fri, 6 Jan 2012 10:56:46 +0000 (UTC) Received: from martymac.org (webmail.galacsys.net [217.24.81.215]) by data.galacsys.net (Postfix) with ESMTP id 45C3C1714FC for ; Fri, 6 Jan 2012 11:36:56 +0100 (CET) From: "Ganael LAPLANCHE" To: freebsd-ports@freebsd.org X-Openwebmail-Date: Fri, 6 Jan 2012 12:36:56 +0200 Message-Id: <20120106102656.M75753@martymac.org> X-Mailer: Open WebMail 2.01 20030425 X-OriginatingIP: 88.163.147.236 (ganael.laplanche@martymac.org) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Date: Fri, 6 Jan 2012 11:36:56 +0100 (CET) Subject: Introducing fpart - a file partitioning tool X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2012 10:56:47 -0000 Hi everyone, Have you ever wondered how you could split a file tree into parts of the same size, or into parts with a limited size or file number ? I have developed a small BSD-licensed tool called fpart that can do that for you (see http://contribs.martymac.org and https://sourceforge.net/projects/fpart). This small C program will crawl a given set of file or directory paths, organize them and print resulting partitions. This can be useful to e.g. launch several rsync(1) in parallel or store files on media of limited size. Here are some examples : 1) Produce 3 partitions, with (approximatively) the same size and number of files : $ fpart -n 3 -o var-parts /var 2) Produce partitions of 4.4 GB, containing music files ready to be burnt to a DVD : $ fpart -s 4724464025 -o music-parts /path/to/my/music 3) Produce partitions containing 10000 files each by examining /usr and /home : $ find /usr ! -type d | ./fpart -f 10000 -i - /home | grep '^0:' The tool is already available in ports (sysutils/fpart) but has also successfully been used on GNU/Linux. Enjoy ! Best regards, PS : comment and patches are, of course, welcome :) -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org