LinuxQuestions.org
Visit Jeremy's Blog.
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 08-27-2012, 04:36 AM   #1
raghuveer
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Bash Shell


How can we delete specific number of commands from history.
like out of 100 history commands last 10 commands
 
Old 08-27-2012, 04:43 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
This should give you a few ideas http://www.foogazi.com/2008/06/25/ho...-bash-history/
 
Old 08-27-2012, 05:19 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
probably you need to edit $HISTFILE directly
 
  


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
A question about shell (bash shell) thomas2004ch Linux - Newbie 4 08-27-2009 03:09 AM
in bash shell how to run shell script during startup rammohan04 Red Hat 2 07-31-2009 03:07 AM
copy directories and files recursively using C shell or bash shell bostonuser Programming 7 06-06-2008 02:24 AM
own shell in place of bash shell somu_thedev Programming 6 07-31-2007 11:13 AM
Run a C Shell using only Bash shell HSN Linux - Software 1 12-25-2006 08:44 AM


All times are GMT -5. The time now is 04:46 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration