Re: Strange 'find' misbehaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> I just found out something strange. Try it out for yourselves. Here
> goes. Search for any directories under /boot:
>
> # find /boot/ -type d
> /boot/
> /boot/grub
> /boot/lost+found
>
> So far so good. Now execute a detailed listing on the results:
>
> # find /boot/ -type d -exec ls -l \{} \;
>
> ...
>
> Why does 'find' suddenly list everything... and not just the directories?

Nothing strange here. What do you expect from
  # ls -l /boot/
Right, you'll see the contents of the directory /boot.

You might be looking for
  # find /boot/ -type d -exec ls -ld {} \;

Chris
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux