On Fri, 23 Sep 2005, Tolkin, Steve wrote:
> Here are a few lines from the output of
> \bin\find -print -ls
>
> 94573 0 drwxr-xr-x 6 a071046 Administ 0 Sep 21 15:05 ./ant
> ./ant/bin
> 95124 0 drwxr-xr-x 2 a071046 Administ 0 Sep 21 15:05
> ./ant/bin
> ./ant/bin/ant
> 95128 3 -rwxr-xr-x 1 a071046 Administ 5140 Apr 16 2003
> ./ant/bin/ant
> ./ant/bin/ant.bat
>
> Note each file is on two lines. Probably that is the default for -ls.
Nope. It does that because you told it to. You told find that you wanted
a -ls listing, and you also told it -print to just print the filename. If
you did the -ls without the unnecessary -print, you'd just get one line
per file.
> Also date and time are combined into three fields, but the third is
> either time or year. This makes it harder to process. I would actually
> prefer time in seconds since the start of the Unix eon.
That's the normal behavior of ls. I'm not sure offhand if there's a good
alternative.
> Also there is no easy way to distinguish Files from Directories except
> by further parsing of the permissions string, e.g. drwxr-xr-x.
If you only want one or the other, you can use -type:
find . -type f -ls f == files
find . -type d -ls d == directories
--
John Abreau / Executive Director, Boston Linux & Unix
ICQ 28611923 / AIM abreauj / JABBER [EMAIL PROTECTED] / YAHOO abreauj
Email [EMAIL PROTECTED] / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm