Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member aress24x7's Avatar
    Join Date
    Aug 2003
    Posts
    18

    Default procedure for deleting perticular shell command from "history" command

    Hello,

    I need the procedure for deleting the perticular shell command from the "history" command.I want to protect other user so that they can't know which comands was run on shell.

    thank you.
    Aress 24x7 Support

  2. #2
    Member vishal's Avatar
    Join Date
    Jan 2003
    Location
    India
    Posts
    343

    Default Re: procedure for deleting perticular shell command from "history" command

    Originally posted by aress24x7
    Hello,

    I need the procedure for deleting the perticular shell command from the "history" command.I want to protect other user so that they can't know which comands was run on shell.

    thank you.
    I dunno the exact way for deleting a particular command from history but if you want to CLEAR all the commands from HISTORY then use :

    clear history

    Hope this helps !
    rh_linuxion

    It is very simple to be Happy but it is very difficult to be Simple.

  3. #3
    Member vishal's Avatar
    Join Date
    Jan 2003
    Location
    India
    Posts
    343

    Default Re: Re: procedure for deleting perticular shell command from "history" command

    Originally posted by vishal
    I dunno the exact way for deleting a particular command from history but if you want to CLEAR all the commands from HISTORY then use :

    clear history

    Hope this helps !
    Yeah here is how you can achieve that :

    history -d <line number>

    that line will get deleted from the history

    man is your friend
    rh_linuxion

    It is very simple to be Happy but it is very difficult to be Simple.

  4. #4
    Member aress24x7's Avatar
    Join Date
    Aug 2003
    Posts
    18

    Default reopen

    i think history's commands are store in .bash_history in ROOT.If we delete from that then .........

    But still it doesn't work.

    Have you any answer!!!!!!!!!
    Aress 24x7 Support

  5. #5
    Member vishal's Avatar
    Join Date
    Jan 2003
    Location
    India
    Posts
    343

    Default Re: reopen

    Originally posted by aress24x7
    i think history's commands are store in .bash_history in ROOT.If we delete from that then .........

    But still it doesn't work.

    Have you any answer!!!!!!!!!
    Yes they are stored in .bash_history and if you delete them from the file but obvious it 's not going to affect your current history coz those are stored in the Env Variable.

    Have tried :

    # history -d <line number>

    This should work !
    rh_linuxion

    It is very simple to be Happy but it is very difficult to be Simple.

  6. #6
    Member aress24x7's Avatar
    Join Date
    Aug 2003
    Posts
    18

    Default replay

    Yes,I tried it but still i get the problem.
    I think there are some procedure and then delete that perticular command from the .bash_history.

    Thank you in advance.

    Best regards,
    Your Friend.
    Aress 24x7 Support

  7. #7
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Are you looking for roots .bash_history or the users one? The users one is in /home/username/.bash_history.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

Similar Threads & Tags
Similar threads

  1. 0.7.3 bug .. command line "pure-ftpd (IDLE)"
    By SNN in forum cPGS Discussions
    Replies: 1
    Last Post: 03-30-2010, 05:25 PM
  2. Script to automatically e-mail output of "top" command
    By casey in forum cPanel and WHM Discussions
    Replies: 16
    Last Post: 11-16-2006, 06:44 PM
  3. pure-ftpd "500 Unknown command"
    By dreamguitar in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-18-2005, 03:45 PM
  4. Can't use Lynx command -> "Configuration file (null) is not available."
    By taotoon in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 08-08-2005, 08:06 PM
  5. Perl's "do" command -- reasons for not working?
    By rogergraves in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-30-2004, 03:51 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube