Rich Freeman on 11 Apr 2012 09:33:45 -0700
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Sort a file tree by last modified time
|
- From: Rich Freeman <r-plug@thefreemanclan.net>
- To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
- Subject: Re: [PLUG] Sort a file tree by last modified time
- Date: Wed, 11 Apr 2012 12:33:40 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=BWA/ycuqCMGfscfGIi0DeGSc2RugZ3YvEFvPDPylDmQ=; b=MX5hXhmZdJzI5M051ZVyw1I8fzfAZ4SquAK1N0FKB40v7JkwU47GRUK2nLYpKF0R5H jMUydNWtJv/JGEerxqPyP4/Zab8skPGLP9110WDSz4tcaXfHxrU+zcuMXXDRzRv5C0dY 8CxZjhMxv1+4WhPHR8OtXiZeSRpV5lfceRw7csGRvqjNIcndED6qnOAn/IVVsiBWTrjt d7q7m4INedOEvSLkAtUmfKIeb3vG0CksPeIiFz0rmGW8ueIYHww1vHrbwjOwTzj6pxQP 7VpZBV1Epn7huYzC4CtScYrvbCgJRpVUk1WuutdiKi28QXz9msbilgDVXfxTmwQd+Wrf +b/w==
- Reply-to: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
- Sender: plug-bounces@lists.phillylinux.org
On Wed, Apr 11, 2012 at 12:13 PM, Paul Jungwirth > I suppose one
caveat with this approach is that it will give incorrect
> results on large trees, because files will only be sorted within each
> invocation of `ls`. So some recently-changed files are going to be
> buried up in the middle of the results. Hmm.
How about:
find content -type f -print0 | xargs -0 ls -l --time-style='+%s' | sort -n -k 6
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug