Sujet : Re: Files tree
De : dwhodgins (at) *nospam* nomail.afraid.org (David W. Hodgins)
Groupes : comp.os.linux.miscDate : 12. Apr 2024, 17:25:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <op.2l4ilgmba3w0dxdave@hodgins.homeip.net>
References : 1
User-Agent : Opera Mail/12.16 (Linux)
On Fri, 12 Apr 2024 08:39:34 -0400, James Harris <
james.harris.1@gmail.com> wrote:
For a number of reasons I am looking for a way of recording a list of
the files (and file-like objects) on a Unix system at certain points in
time. The main output would simply be sorted text with one
fully-qualified file name on each line.
<snip>
Use a command that's designed for that purpose.
https://oldmanprogrammer.net/source.php?dir=projects/treeUsing "tree --noreport -ifax /" lists all files on the root file system,
excluding other file systems such as /dev.
Repeat the command for each file system you want to include.
For a file with control characters in the name, it uses octal escape codes.
For example, in a directory called test with a file called "some$'\n'file",
it shows ...
$ tree --noreport -ifax /home/dave/test
/home/dave/test
/home/dave/test/some\012file
Check your distro to see if it already has the tree package available.
Mageia has it available, but not installed unless specifically requested.
Regards, Dave Hodgins