The tag has no usage guidance.

learn more… | top users | synonyms

31
votes
6answers
72k views

Is there a global, persistent CMD history?

Sometimes I forget how the exact syntax of a CMD command looks and then I would like to search my own CMD history. Clearly, within the same session, you can browse it with the up and down arrow keys ...
29
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?
7
votes
6answers
4k views

How can I record Linux commands?

Is there a way to record the Linux commands I use and reuse them on another machine or in case I want to reinstall the machine? In example record how I set up NginX, PHP and permissions in my lab ...
4
votes
1answer
369 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 ...
3
votes
2answers
2k 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 ...
1
vote
2answers
1k 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
2answers
1k 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
210 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 ...
0
votes
1answer
898 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?
0
votes
1answer
80 views

setting up history variables for ssh user

im logging into a particular ip using ssh user@ip then i type in a few commands, then i exit and when i relogin and type history, all the previous commands are gone. Now i understand i have to export ...
-1
votes
1answer
43 views

History with SSH IP-address

Trying configure SSH client connection IP-address to be in history, I have multiple people using one account and I wanna know which person ran command. I have been messing with that around alot and ...