From owner-freebsd-questions@FreeBSD.ORG Tue Jan 29 03:18:25 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 2561EB11 for ; Tue, 29 Jan 2013 03:18:25 +0000 (UTC) (envelope-from ralf.mardorf@rocketmail.com) Received: from nm18.bullet.mail.ird.yahoo.com (nm18.bullet.mail.ird.yahoo.com [77.238.189.71]) by mx1.freebsd.org (Postfix) with SMTP id 75F3A17F for ; Tue, 29 Jan 2013 03:18:23 +0000 (UTC) Received: from [77.238.189.49] by nm18.bullet.mail.ird.yahoo.com with NNFMP; 29 Jan 2013 03:15:17 -0000 Received: from [46.228.39.104] by tm2.bullet.mail.ird.yahoo.com with NNFMP; 29 Jan 2013 03:15:17 -0000 Received: from [127.0.0.1] by smtp141.mail.ir2.yahoo.com with NNFMP; 29 Jan 2013 03:15:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s1024; t=1359429317; bh=AY0dfwhnQsTIu0kDJm822yeQ3HJ7ADe6x7QNfTHpuZc=; 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=b4IT9arZvKlECRjl7N/xpg4OImCnMemknBkejrR7BN1wmnxCMCj5U7XPUYWti8IlF7D5yqcJhW74+VFxyMDRHf2WcmWOhVUAUd8WkhIUN5cXJ9WFJe/hewG5LJdim2TzmcmeC7+1GvdQH/LlV4TkLocB8xLF+fJxxMdYgoXfCjU= X-Yahoo-Newman-Id: 789924.58292.bm@smtp141.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CTOwHyEVM1lhQEu5DXfwJRwBWegYECM_CcsBXn3.5Rf2L3y e7edXMgzO2krdyZ.p5OfWNFGWauKylVlVSQasGFr_NiUwgUDls5kdWYKn8pE l2qQnbzY88vO.NBHQORQYjxdxTABmvhQkmR7G1B2700ut2SxMi0iP0EySpWb .GkO9u2UsPnOW1sp2iQcwlW_tf1N7N7a_rkvPe0r1G.eIiXaEdJ_gRKRAP8n M4Y91KJMDIhoO.RuSkSK9oNYNwDGzaS50Q4wJEOBsVJWYidTI4kc5W_4z5KK scSVv0.AwGp_NFDeG5HYzR2wDbzC52D0pAEwuU7xVMWEonFIrBC2Ua_jGpSv Wpaig4yn3H6014WhysKPDMwJeoADjRDFkRAkNyGA4eH7Cp2CiFCgMv2GCXf5 iqRx8CE7OOT2sOuxB4uo_bYVdyQ_oHlz890hRwA-- X-Yahoo-SMTP: BeMCPs2swBABTJ3kAeEiC_hE0mz8jRexLddJfD8pI2j32fOacjBmXg-- Received: from freebsd (ralf.mardorf@92.224.211.22 with login) by smtp141.mail.ir2.yahoo.com with SMTP; 29 Jan 2013 03:15:17 +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:15:17 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ralf Mardorf" Message-ID: In-Reply-To: <51073C35.8010602@gmail.com> 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:18:25 -0000 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 :).