0
votes
1answer
102 views

Disable the ability to hide bash command history

User can hide the command history in bash by either append a space before the command unset HISTFILE How to disable this?
1
vote
1answer
61 views

bash_history file and history command showing different entries

I am using the Terminal app on OS X to try and clear my command history. The entries within my $HOME/.bash_history file do not match what is returned by the history command. The echo $0 command tells ...
1
vote
2answers
468 views

How can I put the last zsh command in history into a clipboard?

It often happens to me, that I just used a command and I need to copy/paste it either to a different terminal window/IM or whatever. On a Mac, I can use the pbcopy command to get something in ...
1
vote
1answer
143 views

How to i skip history? [duplicate]

Possible Duplicate: Avoid to keep command in history Is there a facility to skip history for some commands in Linux? How can I skip history for a login? When I login as user "abc", I don't ...
13
votes
3answers
996 views

Strange bash history behaviour when running multiple sessions

How is command line history stored when I use multiple terminal windows? I know it is stored in .bash_history but I can't see the logic on what history is used if I open new window. It almost feels ...
3
votes
2answers
1k views

Preventing bash (and ksh) history alteration in Linux

From the looks of things, fixing ksh to make history alteration impossible is fairly easy. I've seen all the recommendations to make HIST* environment variables read-only, and the use of chattr to ...
5
votes
2answers
619 views

Why does CTRL-r act weirdly (showing only part of a command) on OS X

Ctrl-r is a great little tool for searching your .bash_history for previously run commands. However, when I use it in my OS X Terminal.app I see weird behavior, and I was wondering if anyone else ...
1
vote
2answers
1k views

Linux Command Prompt - Ctrl + r - Not working so swell

Whenever I hit ctrl-r in my command prompt it seems like I have 10 milliseconds to finish typing whatever I'm searching for and at that point it searches for whatever I've typed so far. It also ...
2
votes
4answers
695 views

Ubuntu - Bash - How to Ctrl + R

I can't seem to locate recent commands I've run when I do Ctrl + R in my terminal, nor can I see them when I hit the up arrow. It was a long command. Is there a length limit to what is stored? I ...
4
votes
1answer
352 views

How to show command history with executed time on Unix

I tried export HISTTIMEFORMAT='%D %T' but it seems the time stamp of commands executed before I set HISTTIMEFORMAT will be the time I logged in current session. Is this normal? Is there any way to ...
1
vote
2answers
694 views

HISTCONTROL=ignoreboth not working debian lenny

Can anybody confirm if by setting the the following env variables under debian lenny will make previous history entries not to be saved. GNU bash, version 3.2.39(1)-release export ...
1
vote
1answer
152 views

Avoid duplicates in bash history

Is there a way that I can remove repeated commands from bash history? For example: I run the mv command once, then I run the ls command n times. I have to press the up arrow n times to get the mv ...
5
votes
4answers
3k views

GNU screen loses (parts of) command histories

I use GNU screen with 5 different sessions, each of which stores its own command history. But often I don't find a command in the history, although I'm sure I've used it exactly in the session I'm ...
21
votes
5answers
2k views

Avoid to keep command in history

I use bash and I would like to avoid some commands being kept in the history. Is it possible to do that for the next command only? Is it possible to do that for the entire session?