Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to recover .bash_history? Post 302826751 by hergp on Thursday 27th of June 2013 08:25:15 AM
Old 06-27-2013
First run the history command to get a list of lines in the history:

Code:
$ history
    1  ./t
    2  ksh93 -c ./t
    3  ksh93 ./t
    4  ksh93 -c ./t
    5  ls
    6  history

then delete the line in question (for example line 5):

Code:
history -d 5

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

.bash_history

Question for all sysadmins. How do you keep track of what commands each user uses on his account. I thought an easy way is to monitor .bash_history, however those files can be "edited" by the user. Is there a permission combination that will allow the shell to record to it but yet they can't edit... (12 Replies)
Discussion started by: jason6792
12 Replies

2. UNIX for Dummies Questions & Answers

Change .bash_history to another one

we need the help to change .bash_histroy file in root ,(i.e) we want to save the histroy for .temp.txt for permenently. how to do?? Help us (1 Reply)
Discussion started by: thakshina
1 Replies

3. UNIX for Advanced & Expert Users

.bash_history

During the course of the session before I logout I see some of the commands listed from my previous session but not from my current session and after I logout and log back in I see the commands which I ran before logging out. Does the .bash_history stay in the buffer or someplace else then? ... (2 Replies)
Discussion started by: jacki
2 Replies

4. Solaris

recover after delete using rm -rf

Dears, hi all i write this command rm -rf /export/home/john this there any command make me able to restore this folder again (5 Replies)
Discussion started by: jenovaux
5 Replies

5. Shell Programming and Scripting

.bash_history

Dear All, I am creating users on our servers. the .bash_history supposed to store all the commands entered by the user. My question is, how can I prevent the user himself from editing or viewing this file? I have tried chaning the owner of the .bash_history to be the root user but... (5 Replies)
Discussion started by: charbel.n.s
5 Replies

6. UNIX for Advanced & Expert Users

.bash_history modification

Hi Experts, I know my question would be strange but i need to understand how the .bash_history file is logging user actions (the mechanism) and if possible modify it to include also the date/time of every action done by the user. Sample file: # more .bash_history ssh <IP address> -l axadmin... (3 Replies)
Discussion started by: Dendany83
3 Replies

7. UNIX for Dummies Questions & Answers

how to store time in .bash_history file

Hi - user commands are written in . bash_history of that user when he logs out. my bash_history file shows. not sure what that number means #1329618972 ls -la #1329618978 ls #1329618980 ls -la my bash_profile looks like this PATH=$PATH:$HOME/bin export PATH export... (3 Replies)
Discussion started by: oraclermanpt
3 Replies

8. Shell Programming and Scripting

Display .bash_history with timestamp using script

Hi would like to ask if there is anyway to display .bash_history with timestamp using shell script? i know that you should use history command with HISTTIMEFORMAT="%d/%m/%y %T " to display it in terminal but it does not work when i use it on shell script. It seem that you can't run history... (1 Reply)
Discussion started by: pikamon
1 Replies

9. Solaris

Recover rm command

Consider a situation where in you have used rm command wrongly in a particular directory say rm -r * and we don't have any backup of those files which ever are deleted. NOTE: I'm not facing situation like this but wanted to know what all options are available for such a situation. is... (5 Replies)
Discussion started by: Gautham
5 Replies

10. UNIX for Beginners Questions & Answers

How to get the "history" command to show all that is in the .bash_history file?

I am using the bash shell. When I view my recent command history using the "history" command from the prompt, it only shows me the commands starting at #928. The commands I need are earlier than that, but I can't figure out how to make the other 927 display. They are in my .bash_history... (1 Reply)
Discussion started by: Twinklefingers
1 Replies
fpm2(1) 						    Figaro's Password Manager 2 						   fpm2(1)

NAME
fpm2 - Figaro's Password Manager 2 DESCRIPTION
fpm2 is a GUI password manager using the GTK2 libraries. Passwords are encrypted using the AES-256 algorithm. OPTIONS
-f filename Use a different file to store fpm data. Must include directory where file is stored. -t Start fpm2 hidden in tray. No ask for password on startup. USAGE
launchers Arbitrary launchers can be defined, in order to automatically launch progammes with parameters from the password entry, eg: xterm -title $u@$a -e ssh -X $a -l $u. Possible variables are: $a - an arbitrary argument associated with the password entry - typically a hostname. $u - the username associated with the password entry $p - the password associated with the password entry on-the-fly categories Each password entry can belong to a category, which is generated just by naming it in at least one entry. password generation fpm2 will generate passwords for you. Up to 24 characters with a boolean choices for lowercase, uppercase, numbers, symbols and ambigous characters (eg. `O` and `0`). SECURITY
Using the $p variable means that your password ends up in .bash_history in addition to being visible by ps aux! In order to work around this problem conveniently fpm2 can have your password copied to your primary selection, so that you may easily paste it where needed. Then your password should be as secured as your transport. COPYRIGHT
GNU GPL (GNU GENERAL PUBLIC LICENSE) Version 2, or (at your option) any later version. The licence text is available on any Debian GNU/Linux system in /usr/share/common-licenses/GPL AUTHOR
John Conneely <jconneely@figaro.org> Ale Koval <als@regnet.cz> This manual page was written by Lars Bahner <bahner@debian.org> for the Debian GNU/Linux system. Debian GNU/Linux aug 21 2009 fpm2(1)
All times are GMT -4. The time now is 01:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy