clearing history


 
Thread Tools Search this Thread
Operating Systems Linux clearing history
# 1  
Old 07-28-2008
clearing history

Is it possible to clear certain specific commands from history. I mean not clearing the entire history (history -c).
You don't want anyone to see a particular command you executed. must not also show you have cleared history.

Is it possible ?
# 2  
Old 07-28-2008
Which shell? In bash you can remove individual history entries, ctrl-k kills the current line (though it is saved in the "kill ring").
# 3  
Old 07-28-2008
try
history -c -> to clear all history and history -d #no to delete particular line
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

The Great History of UNIX (1969-1999) | 30 Years of UNIX History | YouTube Video

I am pleased to announce this new video in 1080 HD for UNIX lovers honoring thirty years of UNIX history spanning from 1969 to 1999 presented in 150 seconds (two and a half minutes) in 1080 HD, celebrating the 50th anniversary of UNIX. The Great History of UNIX (1969-1999) | 30 Years of UNIX... (8 Replies)
Discussion started by: Neo
8 Replies

2. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies

3. AIX

clearing PVID

HI admins, I am not able to clear pvid .I am getting below error. chdev -l hdisk273 -a pv=clear Method error (/usr/lib/methods/chgdisk): 0514-047 Cannot access a device. pv The disk is from SAN. I can clear remove the disk using rmdev.But if i run cfgmgr , this disk apperas... (2 Replies)
Discussion started by: newaix
2 Replies

4. Shell Programming and Scripting

BASH - Clearing value in a variable

anyone has any idae how do i clear the value in a variable in BASH? So far I come across "Clear-variable", however it can only clear a "Local" and "Global" variable. I'm trying to clear a self-declared variable. Anyone has any suggestions? (4 Replies)
Discussion started by: vinzping
4 Replies

5. UNIX for Dummies Questions & Answers

Clearing history of commands executed

Hi, I have cleared the commands by using >$HOME/.sh_history. But if i issue HISTORY it shows some reference numbers but not the commands executed. But i want to truncate those line numbers too. May i know how i can achieve this? Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies

6. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies

7. UNIX for Dummies Questions & Answers

How to review the history and the commands that has been done in this history?

Hello every body, Kindly inform me How Do i find out the time I executed a command previously on UNIX Solaris?? To be more specific and more clear about what i want to know is that I want a command the enables me to know the history and which command i run at this history/time. FYI I used... (5 Replies)
Discussion started by: ahmedamer12
5 Replies

8. HP-UX

clearing history

HI, Can anybody tell me...what is a command for clearing command history in HP-UX machine. I tried 'history -c' but it is not applicable.... Thanks JAGDISH MACHHI (4 Replies)
Discussion started by: jagdish.machhi@
4 Replies

9. Programming

Clearing Data in an Array

How would I clear all data from an array? Here is what I'm doing: while (1) { if ((numbytes = recv(sock2, buf, 100, 0)) == -1) { perror("recv"); } printf("%s : %s", inet_ntoa(their_addr.sin_addr), buf); }buf still has extra data in it, so when I print it, things from previous data is put... (3 Replies)
Discussion started by: Octal
3 Replies

10. UNIX for Dummies Questions & Answers

Clearing Swapfiles?

Hi, Does anyone know of a command to safely clear the swapfiles to free up diskspace? It's done at shutdown/startup, but I'd rather not have down time, if possible. Thanks, MrToast (BTW, Mac OS X 10.3.5 ;) ) (3 Replies)
Discussion started by: MrToast
3 Replies
Login or Register to Ask a Question