by sjs · 14y ago · 0 comments
find . -print | xargs ls
`find` dumps the results to stdout, the pipe shuttles `find`'s stdout to `xargs` stdin, `xargs` uses its stdin as arguments for `ls`.(Don't run this in your home directory)
[1] Pedants will realize this is actually equivalent to `ls .* *` as hidden files are found by `find`.
Note also that "-print" is the default command for find, so you can leave it off. Other commands include -print0 (NUL-delimited instead of newline-delimited) and -exec.