LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-19-2005, 01:14 AM   #1
jagroop mand
LQ Newbie
 
Registered: Dec 2004
Posts: 8

Rep: Reputation: 0
removing only most previously executed command from history?


hello friends,

i am new to this form .
my problem is that i want to delete only the most recently executed command from history without manually editing the file .
for eg. i open .bash_history file with vi command & i delete some previously
executed commands manually . now when i save the changes
& logout , then login again .bash_profile contains entry of "vi .bash_profile"
in it , which i don't want.
so please help me.
ur friend,
mand
 
Old 01-19-2005, 04:54 AM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
I don't think theres a way of editing the history without it being recorded in the history, but you can exclude things from being inserted into history in the first place. Maybe you could exclude the history command, and edit the history with that. History reference
 
Old 01-19-2005, 05:39 AM   #3
jagroop mand
LQ Newbie
 
Registered: Dec 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Thumbs up



Last edited by jagroop mand; 01-19-2005 at 05:41 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Command history? King4lex Linux - Newbie 4 09-03-2004 08:35 PM
No effect when 'export' command executed in a script? sylvain_gnu Linux - Software 6 04-20-2004 07:15 PM
How find which command has been executed by which user. HPUX 11.11 OS kshell murugesan Linux - Distributions 3 04-16-2004 05:26 AM
How do I undo last command executed? Elfking Linux - General 4 02-05-2004 01:18 AM
Finding and Removing previously installed software SirLancelotX Linux - Software 3 07-24-2003 05:46 PM


All times are GMT -5. The time now is 10:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration