Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Dec 2004 15:57:16 -0600
From:      Joshua Lokken <joshua.lokken@gmail.com>
To:        Questions <freebsd-questions@freebsd.org>
Subject:   less -f
Message-ID:  <bc5b638504122913577a3faec1@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

# uname -a
FreeBSD voyager.swabbies.local 5.2.1-RELEASE-p13 
FreeBSD 5.2.1-RELEASE-p13 #0: Sat Dec 11 19:35:53 PST 2004    
root@voyager.swabbies.local:/usr/obj/usr/home/src/sys/VOYAGER  i386


I was reading a reply to the thread,
"Pop-up or plugin or script for folder change" that said:

"Just like everything else, a directory *is* just a file.
 Go ahead, use vi or most[1] to look inside!"

and

"[1]:
 I think less (more is really less here) is less willing
 to cooperate on directories than most."

So, I did man less(1), and found this:

-f or --force
   Forces non-regular files to be opened.  (A non-regular file is a
   directory or a device special file.)  Also suppresses the  warn-
   ing message when a binary file is opened.  By default, less will
   refuse to open non-regular files.

However,:

> ls -l ~netmin | grep mydir
drwxr-xr-x  2 netmin  netmin   512 Dec 29 10:45 mydir

> less -f ~netmin/mydir
/home/netmin/mydir is a directory

Can someone explain this behavior to me?  I admit that I may
not understand the -f flag wholly, however, this seems in direct
contradiction with the man page.

-- 
Joshua Lokken
Open Source Advocate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bc5b638504122913577a3faec1>