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

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scott R. Godin wrote:
>> 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 {} \;

Define better.  :)

Here's the time to run both commands on a new users home directory on
my system (Core Duo T2300, 1GB RAM).

find ~ | xargs ls -ld:

    real    0m0.019s
    user    0m0.008s
    sys     0m0.008s

find ~ -exec ls -ld {}:

    real    0m1.007s
    user    0m0.072s
    sys     0m0.212s

That's on a directory with only 121 entries found by find.  Ouch.

And, the find -exec command's output wasn't aligned consistently like
it is when run from xargs (since with -exec you're executing an ls for
each file or dir, AFAIK).

- -- 
Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
The urge to save humanity is almost always a false front for the urge
to rule.
    -- H. L. Mencken

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iG0EARECAC0FAkSr6N8mGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt
ei5hc2MACgkQuv+09NZUB1pSkQCgnpZBxwPvvuRwoCOHNpxNM+mjmO4AoI1ju3XK
cCntA40UO6AlwXogu/4R
=HsL8
-----END PGP SIGNATURE-----

-- 
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