'less' command sometimes results in tilde chars?

Antoneo

Diamond Member
May 25, 2001
3,911
0
0
Why does 'less' sometimes display some output where any up|down keystrokes results in vertically repeating '~' chars?

Observed in freebsd and ubuntu server.

Thanks!
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Probably because of text encodings and the terminal emulation, what files are you seeing this on?
 

Antoneo

Diamond Member
May 25, 2001
3,911
0
0
I'm running FreeBSD 8.2 and saw it happen just now after:

# wbinfo | less

(Why do people include the # symbol when presenting commands? I'm just following what I've seen on other boards so far... 'history' doesn't present it in that manner.)

You wouldn't happen to be a SAMBA guy would you? I'm trying to make Active Directory integration happen on my home network and am running into issues with PAM. SSHD isn't allowing me to log in using AD credentials. Seeing a few odd issues (unexpected permission behavior) with SAMBA+AD but it works. Might post a thread later if I'm still stuck.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
What terminal are you using?

Most people put either a # or a $ just to denote it's a shell command and whether it was run as root or not.
 

Antoneo

Diamond Member
May 25, 2001
3,911
0
0
I'm running the command on the console in either csh or bash.

Here's what it looks like right after I run 'wbinfo|less':
less1.jpg


Here's what it looks like right after I press the up key:
less2.JPG
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
probably a *unix joke like if you wanted less, why you looking for more.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I know that vi displays ~ on an empty line, maybe that version of less does that too? But you still haven't answered the question about the terminal and the screenshot doesn't indicate it either. Are you on the console via VMware, VB, etc or ssh'd in via putty or something?
 

Antoneo

Diamond Member
May 25, 2001
3,911
0
0
Ah, sorry about that Nothinman, didn't mean to avoid answering your question.

I'm running a FreeBSD VM on VMware ESXi 4.1 and am console'd in using VMware's Infrastructure Client.

I don't have a Ubuntu VM up yet, but will try to get one up and running this weekend.

Yesterday I was reminded of the fact that group membership changes take effect only after a logout.
 

Antoneo

Diamond Member
May 25, 2001
3,911
0
0
Yep, got the exact same behavior with SSH via putty. Would be nice if I could see the start of the output without piping to a file (can't imagine any *nix user happy with that).
 

Antoneo

Diamond Member
May 25, 2001
3,911
0
0
In putty:
# echo $TERM
xterm

In VIC console
# echo $TERM
cons25

Grr... Active Directory + PAM + Winbind + SSH isn't working out yet. So close to the Holy Grail!
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
From the 'less' man page:

-~ or --tilde
Normally lines after end of file are displayed as a single tilde (~). This option causes lines after end of file to be displayed as blank lines.

I never really noticed since vim does it too, but I just ran it on a small file and it does indeed do that by default.
 

Antoneo

Diamond Member
May 25, 2001
3,911
0
0
Thanks for looking into it Nothinman (ah man pages). I found that running 'wbinfo --help | less' gives me what I want. Given that, I don't think it's a bug (I'm guessing it's due to the way data is being provided to 'less').

As an aside, after struggling for more than a week, I was finally able to SSH in using my AD credentials. Read many man pages and crawled pretty much all of the web before doing so, but it feels good to finally get something working. Learned a lot about PAM and such, cool stuff.