From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7C0101381F3 for ; Fri, 13 Sep 2013 05:11:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 24DA2E0BAA; Fri, 13 Sep 2013 05:11:41 +0000 (UTC) Received: from mail119c7.megamailservers.com (mail119c7-2520.megamailservers.com [69.49.98.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0E970E0B2C for ; Fri, 13 Sep 2013 05:11:39 +0000 (UTC) X-POP-User: admin.sys-concept.com Received: from syscon7.localdomain (S01060050da7ae68c.ed.shawcable.net [68.149.90.13]) by mail119c7.megamailservers.com (8.13.6/8.13.1) with ESMTP id r8D5Bb0E009630 for ; Fri, 13 Sep 2013 01:11:39 -0400 Received: by syscon7.localdomain (Postfix, from userid 1000) id ABCDF2040B5; Thu, 12 Sep 2013 23:11:48 -0600 (MDT) Date: Thu, 12 Sep 2013 23:11:48 -0600 From: Joseph To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] look for a file type + sort Message-ID: <20130913051148.GB4586@syscon7.inet> References: <20130913044830.GA4586@syscon7.inet> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CSC: 0 X-CHA: v=1.1 cv=dE5LWfU0s3lPBeXNjWsXmXsYO56SZzstuuSX1PXHmQE= c=1 sm=1 a=wom5GMh1gUkA:10 a=u5azqbfQ5rEA:10 a=nDghuxUhq_wA:10 a=8nJEP1OIZ-IA:10 a=C3ZDv51cNVt4vJz/79I2xQ==:17 a=pGLkceISAAAA:8 a=t6joyH_YKkN55qEKIYAA:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=C3ZDv51cNVt4vJz/79I2xQ==:117 X-CTCH-Spam: Unknown X-CTCH-RefID: str=0001.0A020207.52329E8B.007E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-Archives-Salt: 652be953-2f55-4454-8a44-984ec47cce06 X-Archives-Hash: fda1e036e2020b24ec533500692db1e4 On 09/13/13 00:04, Canek Peláez Valdés wrote: >On Thu, Sep 12, 2013 at 11:58 PM, Canek Peláez Valdés wrote: >> On Thu, Sep 12, 2013 at 11:48 PM, Joseph wrote: >>> I want to list recursively certain type of files eg. *.pdf but I want to >>> display: date, path and newest file first. >>> >>> What is the easiest way of doing it? >> >> ls -l --sort=time "$(find /path -iname "*.pdf")" >> >> If there are no spaces in the filenames/directories, you can drop the >> quotes from $(). > >Sorry, it doesn't work with spaces even with the quotes; if you don't >have spaces in the directories/filenames, do > >ls -l --sort=time $(find /path -iname "*.pdf") > >If you have spaces, you need to set/restore IFS: > >S=${IFS}; IFS=$'\n'; ls -l --sort=time $(find . -iname "*.pdf"); IFS=${S} > >Regards. >-- >Canek Peláez Valdés >Posgrado en Ciencia e Ingeniería de la Computación >Universidad Nacional Autónoma de México Hm, I've tried: ls -l --sort=time $(find /home/joseph -iname "*.jpg") got: ls: invalid option -- '/' -- Joseph