[X-Unix] Finding Parent Directory of Searched-For File

Xavier Noria fxn at hashref.com
Mon May 4 09:34:38 PDT 2009


On Mon, May 4, 2009 at 6:33 PM, Xavier Noria <fxn at hashref.com> wrote:

>  find . -name '*.css' | xargs ls -l
> -rw-r--r--@ 1 fxn  fxn   1530 Jun  8  2007 ./stylesheets/datepicker.css
> -rw-r--r--  1 fxn  fxn    742 Feb 27  2007 ./stylesheets/redbox.css
> -rwxr-xr-x@ 1 fxn  fxn   7717 Aug 25  2008 ./stylesheets/structure.css
> -rwxr-xr-x@ 1 fxn  fxn  14341 Aug 25  2008 ./stylesheets/type.css

I forgot a couple of bits to be robust to spaces:

$ find . -name '*.css' -print0 | xargs -0 ls -l
-rw-r--r--@ 1 fxn  fxn   1530 Jun  8  2007 ./stylesheets/datepicker.css
-rw-r--r--  1 fxn  fxn    742 Feb 27  2007 ./stylesheets/redbox.css
-rwxr-xr-x@ 1 fxn  fxn   7717 Aug 25  2008 ./stylesheets/structure.css
-rwxr-xr-x@ 1 fxn  fxn  14341 Aug 25  2008 ./stylesheets/type.css


More information about the X-Unix mailing list