Re: command to list all the files and with the path also

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

 



On Wed, 5 Jul 2006 08:11:30 -0700 (PDT), Al Sparks wrote:

> --- Kaushal Shriyan <kaushalshriyan@xxxxxxxxx> wrote:
> 
> > On 7/5/06, Joachim Backes <joachim.backes@xxxxxxxxxxxxxx> wrote:
> > Hi Joachim Backes
> > 
> > I get
> > 
> > [root@bdc root]# find | xargs ls -l
> > xargs: unmatched single quote
> > [root@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

perhaps better would be 
    find -exec ls -ld {} \;

Also useful to know is how to limit this to directories only, where you
would do something like
    find -type d -exec ls -ld {} \;

or if you just want the paths and not the extra info, remove the -l 
    find -type d -exec ls -d {} \;

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux