Less -f or –force option forces non-regular files to be opened. (A non-regular file is a directory or a device special file.) Also suppresses the warning message when a binary file is opened. By default, less will refuse to open non-regular files. Note that some operating systems will not allow directories to be read, even if -f is set.
1 2 3 4 5 6 7 8 9 10 11 |
mkfifo myfifo ## create a non regular file ps -ax > myfifo ## default less myfifo ## open a new terminal and try to read myfifo ## myfifo is not a regular file ## less -f or --force options less -f myfifo ## display the content of myfifo rm myfifo |