command to list all the files and with the path also

Al Sparks data345 at yahoo.com
Wed Jul 5 15:11:30 UTC 2006


--- Kaushal Shriyan <kaushalshriyan at gmail.com> wrote:

> On 7/5/06, Joachim Backes <joachim.backes at rhrk.uni-kl.de> wrote:
> Hi Joachim Backes
> 
> I get
> 
> [root at bdc root]# find | xargs ls -l
> xargs: unmatched single quote
> [root at bdc root]#

"xargs" is problematic when used with "find".  Basically xargs is
taking raw output and placing it at the end of the command line you're
piping to.  So if you have filenames that have characters which need
to be escaped, the shell doesn't handle it too well.

Also, if you're going to do a recursive list using "find", "xargs",
and "ls" you're much better off using
   find | xargs ls -ld

Without that, you'll get lots of duplicate file listings.

I have used "find" extensively over the years.  I highly recommend
learning it.
   === Al




More information about the fedora-list mailing list