Re: Files tree

Liste des GroupesRevenir à col misc 
Sujet : Re: Files tree
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.os.linux.misc
Date : 12. Apr 2024, 15:15:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uvbfml$2d8f0$2@dont-email.me>
References : 1 2
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Ted Heise <theise@panix.com> wrote:
On Fri, 12 Apr 2024 13:39:34 +0100,
 export LC_ALL=C
 sudo find /\
   -path "/proc/*" -prune -o\
   -path "/run/*" -prune -o\
   -path "/sys/*" -prune -o\
   -path "/tmp/*/*" -prune -o\
   -print0 | sort -z | tr '\0' '\n' > /tmp/f1
 
I know just enough linux admin to be dangerous so this is probably
a dumb question, but I'm wondering why use find rather than ls?

Because 'find' is intended to be a filesystem traversal tool, and it
includes the ability to exclude parts of the tree (the -path -prune
invocations above exclude looking in those sub-trees).

'ls' is meant to display directories to humans, and it has only a
rudimentary ability to walk the tree, and no ability to exclude parts
of the tree you don't want to see.

Date Sujet#  Auteur
12 Apr 24 * Files tree25James Harris
12 Apr 24 +* Re: Files tree3Ted Heise
12 Apr 24 i`* Re: Files tree2Rich
12 Apr 24 i `- Re: Files tree1Ted Heise
12 Apr 24 +* Re: Files tree6vallor
12 Apr 24 i+- Re: Files tree1Rich
13 Apr 24 i`* Re: Files tree4Lawrence D'Oliveiro
13 Apr 24 i `* Re: Files tree3Andy Burns
13 Apr 24 i  `* Re: Files tree2Lawrence D'Oliveiro
15 Apr 24 i   `- Re: Files tree1candycanearter07
12 Apr 24 +* Re: Files tree6Rich
12 Apr 24 i+- Re: Files tree1vallor
13 Apr 24 i+- Re: Files tree1Lawrence D'Oliveiro
20 Apr 24 i`* Re: Files tree3James Harris
20 Apr 24 i +- Re: Files tree1Rich
21 Apr 24 i `- Re: Files tree1Lawrence D'Oliveiro
12 Apr 24 +* Re: Files tree5Borax Man
13 Apr 24 i`* Re: Files tree4Lawrence D'Oliveiro
13 Apr 24 i `* Re: Files tree3Borax Man
13 Apr 24 i  `* Re: Files tree2Lawrence D'Oliveiro
15 Apr 24 i   `- Re: Files tree1candycanearter07
12 Apr 24 +- Re: Files tree1David W. Hodgins
13 Apr 24 `* Re: Files tree3Lawrence D'Oliveiro
13 Apr 24  `* Re: Files tree2The Natural Philosopher
14 Apr 24   `- Re: Files tree1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal