LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-16-2019, 01:01 AM   #1
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Rep: Reputation: Disabled
How can I delete my 'nano' history?


I was surprised to see that when i went into nano and did 'ctl R' and then 'ctl T' that the names of old files from my home folder were still there in nano. I would like to delete this list for privacy measures.

If I go into terminal, "nano ~/.bash_history", it does NOT list those file names. It is only when I do ctl r and t do i see the list, but I don't know how to delete them; hitting delete does nothing and I don't see any commands to delete the entire 'file name'; the files are no longer in the home directory.

Cheers

Last edited by linx9; 07-16-2019 at 01:21 AM.
 
Old 07-16-2019, 01:38 AM   #2
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Can you see your searches in the file ~/.nano/search_history? You can delete these and try again.

If you want to stop making log of your nano history
Open the file /etc/nanorc and comment the line set historylog in this section
set historylog
 
Old 07-16-2019, 02:40 AM   #3
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by eklavya View Post
Can you see your searches in the file ~/.nano/search_history? You can delete these and try again.

If you want to stop making log of your nano history
Open the file /etc/nanorc and comment the line set historylog in this section
set historylog
Do what to "set history log"?
 
Old 07-16-2019, 02:41 AM   #4
individual
Member
 
Registered: Jul 2018
Posts: 315
Blog Entries: 1

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by linx9 View Post
Do what to "set history log"?
Put a # in front of that line.
 
Old 07-16-2019, 03:07 AM   #5
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by individual View Post
Put a # in front of that line.
I did. But still need to clear nano history.

cheers
 
Old 07-16-2019, 03:10 AM   #6
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by eklavya View Post
Can you see your searches in the file ~/.nano/search_history? You can delete these and try again.

If you want to stop making log of your nano history
Open the file /etc/nanorc and comment the line set historylog in this section
set historylog
In a terminal, "no such file or directory": ~/.nano/search_history
 
Old 07-16-2019, 03:24 AM   #7
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by linx9 View Post
In a terminal, "no such file or directory": ~/.nano/search_history
can you check file $HOME/.nano_history?
 
Old 07-16-2019, 05:00 AM   #8
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by eklavya View Post
can you check file $HOME/.nano_history?
no such file with and without a / before home/ HOME, etc
 
Old 07-16-2019, 05:35 AM   #9
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
Apologies if you have already tried this but in your home directory can you type
Quote:
[tim@eraserhead ~]$ ls -a
The "a" switch shows hidden files.
 
Old 07-16-2019, 07:08 AM   #10
ttpp
Member
 
Registered: Jul 2019
Posts: 34

Rep: Reputation: Disabled
Quote:
Originally Posted by timl View Post
Apologies if you have already tried this but in your home directory can you type
The "a" switch shows hidden files.
Thanks. Yes, that does show the names of them, but once I get them there, how would I delete them?

"lock.filename.odt#"
 
Old 07-16-2019, 07:47 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
If I understand your problem. Invoking ^t will display files that do not exist from the command line or another file browser?

From the nano manual:
Quote:
When in the Read-File (^R) or Write-Out menu (^O), pressing ^T will invoke the file browser. Here, one can navigate directories in a graphical manner in order to find the desired file.
I guess I really have not delved into all the nano settings but are you sure you are looking in the correct directory? As far as I can tell ctrl-t it is just a file browser and displays the current contents of the selected directory.

nano will create backup files which have the suffix ~.

~/.nano_history is for saving and reading search/replace strings.

Take a look at your nanorc file(s).

https://www.nano-editor.org/dist/latest/nano.html
 
Old 07-16-2019, 09:58 PM   #12
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
If I understand your problem. Invoking ^t will display files that do not exist from the command line or another file browser?

From the nano manual:


I guess I really have not delved into all the nano settings but are you sure you are looking in the correct directory? As far as I can tell ctrl-t it is just a file browser and displays the current contents of the selected directory.

nano will create backup files which have the suffix ~.

~/.nano_history is for saving and reading search/replace strings.

Take a look at your nanorc file(s).

https://www.nano-editor.org/dist/latest/nano.html
Thanks. When I put a "#" before "set historylog", and then I "ctl O" to write it, when I go back into nano for the same directory, it tells me that the file or directory is currently being modified, do i want to continue. Seems that the file has not written the new command. And it is still saving the names of all new docs. What is not being done to finalize this command? "#set historylog..........ctl O" - yes, from "sudo"

Last edited by linx9; 07-16-2019 at 10:07 PM.
 
Old 07-16-2019, 10:03 PM   #13
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
If I understand your problem. Invoking ^t will display files that do not exist from the command line or another file browser?

From the nano manual:


I guess I really have not delved into all the nano settings but are you sure you are looking in the correct directory? As far as I can tell ctrl-t it is just a file browser and displays the current contents of the selected directory.

nano will create backup files which have the suffix ~.

~/.nano_history is for saving and reading search/replace strings.

Take a look at your nanorc file(s).

https://www.nano-editor.org/dist/latest/nano.html
Thanks. Yes, ctl-t does seem to display the contents of the directory. I'm not sure what the correct directory is since I just want to delete all 'nano-history'. I can go into nano via "sudo nano" or "sudo nano /etc/ssh/sshd_config" and then to 'ctl R' and then 'ctl T' = get same list of all doc titles saved there.

Is nano just holding the titles of the docs or is it actually holding a copy of the files as well???

Last edited by linx9; 07-16-2019 at 10:06 PM.
 
Old 07-16-2019, 10:22 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
nano is not holding anything. ^T is a built in file browser i.e. similar to any graphical application with a file open dialog box.

What history is saved depends on nano's configuration file i.e nanorc as described in the documentation.
 
1 members found this post helpful.
Old 07-16-2019, 11:22 PM   #15
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
nano is not holding anything. ^T is a built in file browser i.e. similar to any graphical application with a file open dialog box.

What history is saved depends on nano's configuration file i.e nanorc as described in the documentation.
Thanks. Maybe to delete the file list there I could uninstall and then reinstall nano. DO you see a problem with that?
 
  


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
[SOLVED] History utility error in Linux Mint 14; cannot delete history mintyninja41 Linux - Newbie 3 03-22-2013 06:36 AM
history clearance for a particular history number in linux sangupari Linux - Software 3 03-03-2010 03:08 AM
tcsh: can you save the history from multiple shells to one history file? BrianK General 2 04-23-2009 05:19 AM
Download history and copy history? inverted.gravity Linux - Newbie 1 02-21-2006 12:31 PM
How to find back "history" database after "history -c" ? san_lss Linux - Newbie 1 01-07-2004 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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