modulok at gmail.com
Mon Jan 10 23:14:14 UTC 2011
On 1/10/11, peter at vfemail.net <peter at vfemail.net> wrote:
> Is there one single-line command I can execute that will list every file in
> every directory on my FreeBSD box? I've been fussing with the ls and du
> commands, but the output is never quite complete.
You might look into the 'tree(1)' command. It's a third party package
that can be installed as:
# pkg_add -r tree
It has lots of flags to list files in various ways. By default it
lists all files in a tree-like format like this:
tree -a /etc
|-- aliases -> mail/aliases
| |-- hcsecd.conf
| |-- hosts
| `-- protocols
... and so on...
You can also list files with full paths without indents and such. See
man tree after its installed. Another example:
tree -aif /etc
/etc/aliases -> mail/aliases
There's also switches for how to handle symbolic links and staying on
one file system, depth limits, file limits, etc.
More information about the freebsd-questions