LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-01-2016, 12:52 PM   #1
Rita G.
Member
 
Registered: Jan 2008
Posts: 157

Rep: Reputation: 25
clear password out of $


i accidentally typed my password in my $ prompt. how do i clear it out?
 
Old 10-01-2016, 12:56 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Have you tried using the left arrow key on your keyboard and holding down the Delete key??
 
Old 10-01-2016, 12:58 PM   #3
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Example:

Code:
$ test
$ history
 2001  test
 2002  history
$ history -d 2001
$ history
 2001  history
 2002  history -d 2001
 2003  history
 
Old 10-01-2016, 01:08 PM   #4
Rita G.
Member
 
Registered: Jan 2008
Posts: 157

Original Poster
Rep: Reputation: 25
thanks for replies, but neither of those methods work.
 
Old 10-01-2016, 01:11 PM   #5
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
How does it not work? Just using history -d to delete the line with your password should be enough. Or are you looking for the 'clear' command?
 
Old 10-01-2016, 01:20 PM   #6
Rita G.
Member
 
Registered: Jan 2008
Posts: 157

Original Poster
Rep: Reputation: 25
'clear' command.
 
Old 10-01-2016, 02:34 PM   #7
slackb0t
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware64-current on Thinkpad Carbon X1
Posts: 264

Rep: Reputation: 63
Just delete your bash history completely.

Code:
rm /home/insert your user name/.bash_history
 
1 members found this post helpful.
Old 10-01-2016, 03:21 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
I think OP was just wanting it removed from the console screen, not from history. The command clear will clear what's on the screen right now, but it only does it by scrolling the screen up until the command prompt is at the top. That means you can scroll back up using Shift+PgUp, so your password would still be visible. To completely erase the output on the console, you'd need to run reset or close the console.

However, @OP, anything you enter in your command prompt will be saved in bash's history, so it would be saved to a file. The information provided by orbea will allow you to remove just the password from the history, or you could use slackb0t's suggestion and just remove the bash history completely.
 
2 members found this post helpful.
Old 10-01-2016, 03:30 PM   #9
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Or enter a bunch of fake passwords to throw the spies off your track.
 
Old 10-01-2016, 04:40 PM   #10
Contrak
LQ Newbie
 
Registered: Mar 2014
Posts: 26

Rep: Reputation: Disabled
ctrl u

or maybe I'm not understanding the question

Last edited by Contrak; 10-01-2016 at 04:41 PM.
 
Old 10-01-2016, 05:13 PM   #11
Ellendhel
Member
 
Registered: Aug 2015
Location: Wilmington, NC
Distribution: Slackware
Posts: 64

Rep: Reputation: 51
Quote:
Originally Posted by slackb0t View Post
Just delete your bash history completely.

Code:
rm /home/insert your user name/.bash_history
I would use:

Code:
rm $HOME/.bash_history
to avoid any typo or similar error
 
Old 10-01-2016, 06:07 PM   #12
Gordie
Member
 
Registered: Aug 2007
Location: Nolalu, Ontario, Canada
Distribution: Slackware64-Current
Posts: 871

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Of course you can delete any line from your .bash_history that you want just like with any other simple text file.
Try it and see
 
Old 10-03-2016, 03:58 PM   #13
Rita G.
Member
 
Registered: Jan 2008
Posts: 157

Original Poster
Rep: Reputation: 25
thank you sweeties . .

rm /home/insert your user name/.bash_history

worked just fine.
 
  


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
wpa_supplicant username and password in clear text AstroFloyd Linux - Security 2 08-03-2015 03:01 AM
wpa_supplicant username and password in clear text roygbiiv Linux - Security 1 07-19-2011 05:00 AM
.htaccess and clear-text password noir911 Linux - Server 1 05-12-2008 12:55 PM
Can't clear CMOS Password adamis Linux - Hardware 3 10-27-2006 01:08 PM
If you use secure IMAP, does your password go clear text? cryptosporidium Linux - Security 1 03-25-2004 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:43 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