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 43C581381F3 for ; Fri, 13 Sep 2013 05:16:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DD43E0C02; Fri, 13 Sep 2013 05:16:54 +0000 (UTC) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D57CDE0BE4 for ; Fri, 13 Sep 2013 05:16:52 +0000 (UTC) Received: by mail-la0-f50.google.com with SMTP id lv10so626911lab.9 for ; Thu, 12 Sep 2013 22:16:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=tzc095awTcIX6nOn1N+yTD7TRvs9mqPeiXGttozuwc4=; b=DZcTRjmdxaK2Lv2mwG3UFpm5skG11YFaO3UPh9YjeguSKLpBH9RzK85nmSaj5DgCXa 8hq76mUkqvoRouBG6Hljzt6Uh2oV9y7niR/gL7cIFjV1xDjD+28DzTd4WxJP9kHcNg3U Zp1WjxP3S1JPXuVbPewpTB0+Dxiek9WFHy9giKLu7JRRpoif5nix3DMFVvfdTX++saKm gwEOWViH28Qvy7Mq6aF9YlAnEpm3H0GgRLd/ILW+4IqkITHocHwhcc80f5mRiAxQ3iLL Vn1u/+oj3aVgXNnYrKMfl8L85mW50N8tP7btUEds/gTksqevTPAqHGoC3Pzr6v7KGGwz k3+Q== 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 X-Received: by 10.152.116.7 with SMTP id js7mr9341479lab.11.1379049411139; Thu, 12 Sep 2013 22:16:51 -0700 (PDT) Received: by 10.114.96.2 with HTTP; Thu, 12 Sep 2013 22:16:51 -0700 (PDT) In-Reply-To: <20130913051148.GB4586@syscon7.inet> References: <20130913044830.GA4586@syscon7.inet> <20130913051148.GB4586@syscon7.inet> Date: Fri, 13 Sep 2013 00:16:51 -0500 Message-ID: Subject: Re: [gentoo-user] look for a file type + sort From: =?UTF-8?B?Q2FuZWsgUGVsw6FleiBWYWxkw6lz?= To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ca877a77-3e57-4cf3-96dd-360f71f9ad8a X-Archives-Hash: 5b80d069aa8cc5c05e1a82a9a46f5523 On Fri, Sep 13, 2013 at 12:11 AM, Joseph wrote: > On 09/13/13 00:04, Canek Pel=C3=A1ez Vald=C3=A9s wrote: >> >> On Thu, Sep 12, 2013 at 11:58 PM, Canek Pel=C3=A1ez Vald=C3=A9s >> 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=3Dtime "$(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=3Dtime $(find /path -iname "*.pdf") >> >> If you have spaces, you need to set/restore IFS: >> >> S=3D${IFS}; IFS=3D$'\n'; ls -l --sort=3Dtime $(find . -iname "*.pdf"); I= FS=3D${S} >> >> Regards. >> -- >> Canek Pel=C3=A1ez Vald=C3=A9s >> Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n >> Universidad Nacional Aut=C3=B3noma de M=C3=A9xico > > > Hm, I've tried: > ls -l --sort=3Dtime $(find /home/joseph -iname "*.jpg") > > got: > ls: invalid option -- '/' The exact same command (changing joseph with canek) works for me, except in directories/filenames with spaces, as expected. Do you have an alias for ls? What does find /home/joseph -iname "*.jpg" returns? Regards. --=20 Canek Pel=C3=A1ez Vald=C3=A9s Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n Universidad Nacional Aut=C3=B3noma de M=C3=A9xico