|
From: | P |
Subject: | Re: ls display directory context? |
Date: | Thu, 20 Jan 2005 15:39:01 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 |
Nic Ferrier wrote:
find childdir --max-depth=1 -type f \ -printf "%AY%Am%Ad%AH%AM %p\n" |\sort -r | gawk '{print $2}'
In general never use ls for scripts as it's designed for human interaction. Use find instead. For example ls can't handle the case where there are directories other than CVS present. Yours is a very special case This is the corrected/optimized version of the above find childdir -maxdepth 1 -type f ! -name ".*" -printf "%T@ %p\n" | sort -r | cut -d' ' -f2- -- Pádraig Brady - http://www.pixelbeat.org --- Following generated by rotagator --- Quickly search word list for prefix look prefix Highlight occurances of word in word list look '' | grep -Fi --color word Lookup word in online dictionaries/info gnome-dictionary ireland --
[Prev in Thread] | Current Thread | [Next in Thread] |