[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] less -f ?
Chris J wrote:
so I tried it on an unsuspecting sub directory of my home dir. AFAIK,
the sub directory seems to have survived but I get this
mkdir test
lesleyb [at] guano:~> less -f test
test is a directory
lesleyb [at] guano:~> less --force test
test is a directory
What version of less (less --version) ? I've got (on a work machine):
[6%][fileserver][cjohnson] >less --version
less 378+iso254 (Red Hat)
Copyright (C) 2002 Mark Nudelman
less --version
less 382+iso254
Copyright (C) 2002 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: http://www.greenwoodsoftware.com/less
Japanized part of Less
Copyright (c) 1994-2000 Kazushi (Jam) Marukawa
On SuSE 9.2 Pro
As mine has a bigger number than yours I'll declare I'm 4 revisions
ahead of you until I know otherwise.
Also I checked out that url and I get access refused.
...and this does:
[7%][fileserver][cjohnson] >mkdir mumu
[8%][fileserver][cjohnson] >less mumu
...[[ dump of directory here as if I'd done an ls ]]...
[9%][fileserver][cjohnson] >less -f mumu
...[[ dump of directory here as if I'd done an ls ]]...
[10%][fileserver][cjohnson] >
so using -f doesn't seem to affect directories.
Interesting they show different results.
While I haven't a clue what would be a reasonable way for less to
display a non-regular file, the man page does say it forces it to be
opened. Pedantically, opening a file is different to displaying it so
what state is that directory left in?
To display it, one must open it, and its only opened for reading, so it'll
be left in exactly the same state as it was when it was before it was opened,
though the atime on the inode may have been updated :-)
ahhhh :)
Lesley
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.