Solved Weird numbers in my csh history

Hi,

These days I find my csh history list unusual, many strange random numbers appear there, just like below:

Code:
    justin@darkgeek-freebsd.pts/3 ~ % history 
    ...skip...
    26  14:08   netstat -an -f inet -p tcp
    27  14:08   netstat -an -f inet -man ne#+1428#+14288drill #+1428895704
    28  9:32    man netstat
    29  11:29   netstat -i -f tcp
    30  11:29   netstat -i -f http
    31  11:29   netstat -i
    32  11:29   man netstat
    33  11:31   netstat -an -f inet -p tcp #+1428896056
    34  11:31   netstat -an -f inet -p vim #+1428896056
    ...skip...

Look at line 27, 33 and 34. I don't know where the weird numbers (like #+1428896056) come from:(.

P.S.: My computer has FreeBSD 10.1 installed, and here is my cshrc file.
 
It looks like your ~/.history file got corrupted somewhere. Normally it looks something like this:
Code:
#+1429166278
cd /usr/local/etc/poudriere.d/
#+1429166278
poudriere bulk -j 10-desktop -f /usr/local/etc/poudriere.d/desktop.lst
#+1429349188
exit
There's a line with a timestamp code (#+1429349188 for example) followed by a line with the actual command. And it looks like yours might be missing a newline here and there.
 
It looks like your ~/.history file got corrupted somewhere. Normally it looks something like this:
Code:
#+1429166278
cd /usr/local/etc/poudriere.d/
#+1429166278
poudriere bulk -j 10-desktop -f /usr/local/etc/poudriere.d/desktop.lst
#+1429349188
exit
There's a line with a timestamp code (#+1429349188 for example) followed by a line with the actual command. And it looks like yours might be missing a newline here and there.
Thanks, I checked my ~/.history file and soon found the corruption you mentioned:
Code:
#+1429232306
nslookup bbs.hupu.com 199.85.12sudo #+1428548158
#+1429232306
nslookup hupu.com 199.85sudo ser#+1428548151
#+1429232306
cat /var/unbound/unboundvim /v#+1428548132
#+1429232306
drill -vc www.mgit push -u origin master
#+1429232306
drill www.myp2pch.negit add -A . && gi#+1428489312
#+1429232306
drill www.myp2pch.teln#+1428489303
#+1429232306
ssh lab603@10.1.16.60p#+1428489294
#+1429232306
sudo service sps auxwww | grep dnsmasq
#+1429232306
sudo service simpsudo rm /usr/local/etc#+1428456855
#+1429232306
sudo service dnsmasq stop

Seems that I have to clear all the history records as a workaround to this issue.:beer:
 
Related weird history: mine was acting very odd suddenly in root's history. Finally I noticed that .cshrc had multiple entries while copying it over to a .tcshrc for editing and use.

Code:
set history = 100
set savehist = (100 merge)

Then again later in
Code:
# set prompt = "\[$(tput bold)\]\[$(tput setaf 4)\][\u\[$(tput setaf 1)\]@\h \W]\[$(tput setaf 6)\]\\$ \[$(tput sgr0)\]"
  set promptchars = "%#"

  set filec
  set history = 100
  set savehist = (100 merge)
  set autolist = ambiguous
  # Use history to aid expansion

Commenting out (or deleting) the first two fixed the problem immediately.
Hopefully this will help somebody else scratching their head too long.....
 
Commenting out (or deleting) the first two fixed the problem immediately.
Hopefully this will help somebody else scratching their head too long.....
Great!
By now I am almost bald, but I think it will grow back now. Thank you all :beer:
 
Back
Top