From owner-freebsd-questions@FreeBSD.ORG Tue Jan 29 03:19:12 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 227BDBB9 for ; Tue, 29 Jan 2013 03:19:12 +0000 (UTC) (envelope-from ralf.mardorf@rocketmail.com) Received: from nm8-vm0.bullet.mail.ird.yahoo.com (nm8-vm0.bullet.mail.ird.yahoo.com [77.238.189.203]) by mx1.freebsd.org (Postfix) with SMTP id 710A0194 for ; Tue, 29 Jan 2013 03:19:11 +0000 (UTC) Received: from [212.82.105.244] by nm8.bullet.mail.ird.yahoo.com with NNFMP; 29 Jan 2013 03:19:09 -0000 Received: from [46.228.39.62] by tm16.bullet.mail.ird.yahoo.com with NNFMP; 29 Jan 2013 03:19:09 -0000 Received: from [127.0.0.1] by smtp195.mail.ir2.yahoo.com with NNFMP; 29 Jan 2013 03:19:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s1024; t=1359429549; bh=dJLqAxWExr1E8+KSjlvF2LYhv7eUGl0Jx6rNF5QfcV0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Content-Type:To:Subject:References:Date:MIME-Version:Content-Transfer-Encoding:From:Message-ID:In-Reply-To:User-Agent; b=jRAxNORxEr4bEexS/fMcCoELnOve2sXUBjdzobcGrR+H240bQOxHFYLoUlvvM/0g3Pfv18pAWX+VyD+XA5PBPDmZNjMxvVStaFDaG2Lo0aA7YP/I+L5AVoNWPYsrMJfqN9ehksZj4ZG+IMZZDpnY/wrw0OQE4kgZTMbLefDPBbI= X-Yahoo-Newman-Id: 340105.56225.bm@smtp195.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 5lI87PMVM1nWynJkgOXb4_NqXk8rWmQoohB.FuCQUckhXwx yK.PkcvY.v9v2d1iXXO6C_RcG_p_tnzk6qvJ931GqJ9kR73RVNdUq9jC0Lvp uyLvAtuoYMdVhgvQyGWVyha_SJYhW8FmYVEZIDR7Eez84oM.lOm24V0gZatn 3aVWV7lwRorsxLi8DfVsPQanhBZKU683W8bqtphjvRxLkz49jWrhW47USs84 wf_nxLyXUAb7aPl1Ukutk4S3w6ZdUWEeWd13Ent69k_FIzOIsWogmSsaqnUB BptIJluOkTWA2K9eD5U3IUCWaUjavp3ac9FD9nBU35B9ox5Pr8PjTT2LMAsV .yTfBFBcP_E._7M2echhbwtdpp0MbBEbaDa8KacKUm8y3yEOROXPT6iyORUb QrXrGHUtkE9uWtPIJdcyliPmDJT7R4yyC3kiG8Q-- X-Yahoo-SMTP: BeMCPs2swBABTJ3kAeEiC_hE0mz8jRexLddJfD8pI2j32fOacjBmXg-- Received: from freebsd (ralf.mardorf@92.224.211.22 with login) by smtp195.mail.ir2.yahoo.com with SMTP; 29 Jan 2013 03:19:09 +0000 UTC Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-questions@freebsd.org Subject: Re: How to fix a broken owner for files from world & build from ports? References: <20130128182726.42db0712.freebsd@edvax.de> <510736DE.4060701@gmail.com> <51073C35.8010602@gmail.com> Date: Tue, 29 Jan 2013 04:19:08 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ralf Mardorf" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.12 (FreeBSD) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 03:19:12 -0000 On Tue, 29 Jan 2013 04:15:17 +0100, Ralf Mardorf wrote: > On Tue, 29 Jan 2013 04:04:21 +0100, Joshua Isom wrote: > >> On 1/28/2013 8:54 PM, Ralf Mardorf wrote: >>> On Tue, 29 Jan 2013 03:41:34 +0100, Joshua Isom >>> wrote: >>>> On 1/28/2013 7:56 PM, Ralf Mardorf wrote: >>>>> Still not perfect, I guess I need something similar to ls -RAl for >>>>> some >>>>> directories :S and I didn't test what awk will do with names >>>>> including a >>>>> space. >>>> >>>> Try `find /dir -ls`. You can pipe it into sed like this `find /dir >>>> -ls| sed -e 's%/dir%%g'` and then get something easily comparable. >>> >>> Cool, it does display the path, but there's still the other issue: >>> >>> $ touch test\ test >>> $ find * -ls| sed -e 's%/dir%%g'| awk '{print $5" "$11}' >>> rocketmouse test >>> >>> Perhaps awk isn't that important, but it e.g. will filter different >>> file >>> sizes, for e.g. configurations I edited in the meantime. >>> >>> :( >> >> You're basically getting down to the dirty tedious parts. Unless you >> know a full featured scripting language with a find library to find and >> compare ownership, or you want a custom c program for a rare >> occurrence, you're just going to have to do it the tedious way. >> Computer's aren't always fun and glory. For every beautiful network, >> someone had to run the wires into the wall, through the dirt, and to >> the other building. > > I already have an idea. Since $11 is the last output I might be able to > check whether there is a space followed by a sign, by a loop, assumed > there should be several spaces, interrupted by signs. I guess to care > for several spaces one after the other and exotic signs that might > "break" awk IMO isn't needed. > > It might become a very long "command line" ;). Perhaps I don't need it, > I have to test it. I extracted the first dump, but need a rest now. > > Thank you :). Solved! # find * -ls | sed -e 's%/dir%%g' | awk '{print $5" "$11" "$12" "$13}' I can add $14 to $83635484 ;).