Mailinglist Archive: opensuse (2810 mails)
| < Previous | Next > |
Re: [opensuse] Any way to Save .bash_history command to file when HISTSIZE= is reached?
- From: "Amedee Van Gasse" <amedee@xxxxxxxxx>
- Date: Fri, 12 Dec 2008 17:43:29 +0100 (CET)
- Message-id: <8309.193.121.250.194.1229100209.squirrel@xxxxxxxxxxxxxxxx>
On Thu, December 11, 2008 09:10, David C. Rankin wrote:
I know it's not an answer to your question, but this helps to keep the
bash history shorter:
export HISTCONTROL=ignoredups
or
export HISTCONTROL=erasedups
Unless of course you want to join that meme where people show off the top
commands in their bash history:
cut -f1 -d" " .bash_history | sort | uniq -c | sort -nr | head -n 30
user amedee:
169 sudo
41 ls
40 exit
20 man
17 cd
17 apt-cache
14 dig
14 curl
13 nano
13 elinks
8 su
8 screen
8 cat
7 phpize
7 irssi
7 hostname
6 slocate
6 locate
6 less
5 grep
4 whereis
4 wget
4 ps
4 df
4 ./apache_volume
3 uname
3 rm
3 ./apache_processes
3 ./apache_accesses
2 which
user root:
51 exit
31 nano
30 ls
30 backup2l
29 tail
27 cd
25 iptables
25 ./hardlink.py
21 zgrep
16 man
15 aptitude
14 zcat
10 ps
10 nmap
10 grep
8 /etc/init.d/postfix
7 mc
7 crontab
7 apt-cache
6 /root/bin/hardlink.py
6 mailtail.sh
5 sudo
5 ./mailtail.sh
5 ip
5 cat
4 slocate
4 rm
4 echo
4 ./awstats.pl
3 `slocate
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
Listmates,
Is there any way to Save .bash_history command to file when HISTSIZE=
limit is
reached? I would love to be able to hack whatever command removes entries
from
the .bash_history file and have it append that cli to something like
history.sav so I could save old command lines. The problem is that I don't
know
where this code lives or whether it is even accessible to me. Anybody have
any
ideas?
I know it's not an answer to your question, but this helps to keep the
bash history shorter:
export HISTCONTROL=ignoredups
or
export HISTCONTROL=erasedups
Unless of course you want to join that meme where people show off the top
commands in their bash history:
cut -f1 -d" " .bash_history | sort | uniq -c | sort -nr | head -n 30
user amedee:
169 sudo
41 ls
40 exit
20 man
17 cd
17 apt-cache
14 dig
14 curl
13 nano
13 elinks
8 su
8 screen
8 cat
7 phpize
7 irssi
7 hostname
6 slocate
6 locate
6 less
5 grep
4 whereis
4 wget
4 ps
4 df
4 ./apache_volume
3 uname
3 rm
3 ./apache_processes
3 ./apache_accesses
2 which
user root:
51 exit
31 nano
30 ls
30 backup2l
29 tail
27 cd
25 iptables
25 ./hardlink.py
21 zgrep
16 man
15 aptitude
14 zcat
10 ps
10 nmap
10 grep
8 /etc/init.d/postfix
7 mc
7 crontab
7 apt-cache
6 /root/bin/hardlink.py
6 mailtail.sh
5 sudo
5 ./mailtail.sh
5 ip
5 cat
4 slocate
4 rm
4 echo
4 ./awstats.pl
3 `slocate
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |