LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-20-2006, 06:24 AM   #1
travisvermaak
LQ Newbie
 
Registered: Apr 2006
Posts: 4

Rep: Reputation: 0
Question Editing command prompt history


I have tried editing the command prompt history, as I have copied an embarrassing line from an email into the command prompt history. I have tried to edit the .bash_history file but this seems to only contain logon history such as su(for super user). It seems there is a different command prompt history once you have logged on. Please help, got to get rid of this as a few people use this server, namely the boss.
 
Old 04-20-2006, 06:31 AM   #2
svennerstal
LQ Newbie
 
Registered: Apr 2006
Location: Sweden
Distribution: Slackware 'cuz I'm a slacker
Posts: 3

Rep: Reputation: 0
Command prompt history

Use 'history' to see your command prompt history. If the embarassing line is there, you might want to wipe the history with 'history -c'
 
Old 04-20-2006, 06:52 AM   #3
travisvermaak
LQ Newbie
 
Registered: Apr 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Is there a way to delete a certain line from the history intead of clearing the entire history
 
Old 04-20-2006, 07:00 AM   #4
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
Deleting those lines out of ~/.bash_history should work. Did you input those commands as root?

Last edited by merchtemeagle; 04-20-2006 at 07:07 AM.
 
Old 04-20-2006, 07:15 AM   #5
travisvermaak
LQ Newbie
 
Registered: Apr 2006
Posts: 4

Original Poster
Rep: Reputation: 0
I was logged in as root, yes. I could not find the line in the .bash_history file. It shows the logon information in that file
 
Old 04-20-2006, 07:31 AM   #6
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
Login as root again and take a look at /root/.bash_history
 
Old 04-20-2006, 08:20 AM   #7
travisvermaak
LQ Newbie
 
Registered: Apr 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks a lot sorted! Thank God!! How do I get rid of this thread
 
Old 04-20-2006, 08:59 AM   #8
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
You can't delete threads.
 
Old 04-20-2006, 10:24 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Now remove the logs that show that you came to linuxquestions
 
Old 04-20-2006, 10:52 AM   #10
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
is your boss a frequenter of LQ too? i'd love to know what was in the history :P
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Curious bash prompt editing question. xconspirisist Linux - Software 3 11-19-2005 07:24 PM
History command amer_58 Linux - General 5 06-24-2005 12:26 PM
Command history? King4lex Linux - Newbie 4 09-03-2004 08:35 PM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM
command history log??? granny Linux - Newbie 3 02-11-2003 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration