Quote:
How do I pass it to perl -pi -e "s/root/tux/g;"?
|
Use a pipe:
Code:
$ tree -af --noreport -i | perl -pi -e "s/root/tux/g;"
Quote:
How do I list only files and not directories?
|
I don't know how to do this with tree (or if it's possible), but you can do it with find.
This will find all files that aren't directories (including symbolic links, fifos, device files, etc):
Code:
$ find -not -type d
This will find only normal files (files which aren't directories, symbolic links, fifos, device files, etc):
See the find manpage. You may also want to read up about pipes online or in your shell's manpage.