I sometimes use less to quickly page through a small collection of files using something like
less brscan/*/*
and then I use :n
to cycle through the files
If I have a folder/s e.g.
brscan/
├── DEBIAN
│ ├── conffiles
│ ├── control
│ ├── postinst
│ ├── postrm
│ └── prerm
├── etc
│ └── opt
├── opt
│ └── brother
└── usr
├── bin
└── lib64
in this example less
will pick up the files in folder DEBIAN
DEBIAN
├── conffiles
├── control
├── postinst
├── postrm
└── prerm
but it wont descend into other subdirectories, it just errors:
brscan/etc is a directory
brscan/opt is a directory
brscan/usr is a directory
is it possible to get less to page the files in these subdirectories?
Im thinking something like
find brscan/ | xargs less
but its not working - still picking up directories
find brscan/ -type f -print0 | xargs -0 less
?-print0
and the-0
option in xargs i.e.find brscan/ -type f | xargs less
thanks!-print0
and-0
in the man page ofxargs
and explained why you should use it.