LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-17-2019, 02:06 AM   #16
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,718

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210

Quote:
Originally Posted by linx9 View Post
Thanks. Maybe to delete the file list there I could uninstall and then reinstall nano. DO you see a problem with that?
I'll give this a shot...

There is no "file list" to delete!
Ctrl-R is Read File
Ctrl-T is just showing you a listing of the files in the current directory -- so that you don't have to type a file name for the Read File (Ctrl-R) command.
That list has nothing to do with "history," or even with nano. It's simply a list of existing files.

You can see the same list by
Code:
ls -a
in that directory.

Go to an empty directory (you may have to mkdir one): Do
Code:
nano
^R
^T
There will be no "list" - only a reference to the parent directory.

There is no history!

Last edited by scasey; 07-17-2019 at 02:10 AM.
 
Old 07-17-2019, 04:10 AM   #17
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
I'll give this a shot...

There is no "file list" to delete!
Ctrl-R is Read File
Ctrl-T is just showing you a listing of the files in the current directory -- so that you don't have to type a file name for the Read File (Ctrl-R) command.
That list has nothing to do with "history," or even with nano. It's simply a list of existing files.

You can see the same list by
Code:
ls -a
in that directory.

Go to an empty directory (you may have to mkdir one): Do
Code:
nano
^R
^T
There will be no "list" - only a reference to the parent directory.

There is no history!
Thanks. But, it seems like a history because the files are no longer on the computer, but the list of former files are. Either way, I want to delete whatever 'lists' there are. Simply, I don't want a "list" of the names of the deleted/cut-pasted files/ documents/ pictures ANYWHERE on my computer.

The file names I want to delete from 'ls -a' either have 'lock' at the beginning of the file name or ".swp' at the end.

Last edited by linx9; 07-17-2019 at 04:34 AM.
 
Old 07-17-2019, 08:40 AM   #18
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,718

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Quote:
Originally Posted by linx9 View Post
Thanks. But, it seems like a history because the files are no longer on the computer, but the list of former files are. Either way, I want to delete whatever 'lists' there are. Simply, I don't want a "list" of the names of the deleted/cut-pasted files/ documents/ pictures ANYWHERE on my computer.

The file names I want to delete from 'ls -a' either have 'lock' at the beginning of the file name or ".swp' at the end.
There is not a way to see a list of files with ls (or nano) "that are no longer on the computer". Both things are showing you files that are on the computer.

Code:
ls -la
will show you who owns the files and when they were created. Are they perhaps backup copies of files you've deleted in the past? Backups made before you deleted the originals?
 
Old 07-18-2019, 04:27 AM   #19
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
There is not a way to see a list of files with ls (or nano) "that are no longer on the computer". Both things are showing you files that are on the computer.

Code:
ls -la
will show you who owns the files and when they were created. Are they perhaps backup copies of files you've deleted in the past? Backups made before you deleted the originals?
Thanks. I did not make any backups, and no, the files listed are not on the computer, at least no where visible to me. Here is what ls -la shows:

~$ ls -la
total 548
drwxr-xr-x 20 pell pell 12288 Jul 17 12:17 .
drwxr-xr-x 4 root root 4096 Jan 28 2018 ..
-rw------- 1 pell pell 44 Jul 17 09:21 .bash_history
-rw-rw-r-- 1 pell pell 0 Jun 7 12:14 .bash-history
-rw-rw-r-- 1 pell pell 1024 Jul 16 02:07 ..bash_history.swp
-rw-r--r-- 1 pell pell 220 Jan 27 2018 .bash_logout
-rw-r--r-- 1 pell pell 3771 Jan 27 2018 .bashrc
drwxrwxr-x 9 pell pell 4096 Jul 18 00:34 .cache
drwxr-xr-x 25 pell pell 4096 Jul 17 12:17 .config
drwx------ 3 pell pell 4096 Jan 27 2018 .dbus
drwxrwxr-x 3 pell pell 4096 Jul 6 18:46 Desktop
drwx------ 2 pell pell 4096 Jul 18 00:59 Downloads
drwx------ 3 pell pell 4096 May 2 04:17 .gconf
drwx------ 3 pell pell 4096 Jul 4 02:10 .gnome
-rw-rw-r-- 1 pell pell 1024 Jul 16 01:50 .g.odt.swp
drwx------ 2 pell pell 4096 Jun 4 16:05 .gphoto
-rw-rw-r-- 1 pell pell 39 Jul 6 22:29 .gtk-bookmarks
-rw-rw-r-- 1 pell pell 1024 Jul 16 02:35 .g.txt.swp
drwx------ 2 pell pell 4096 Aug 31 2018 .gvfs
-rw-rw-r-- 1 pell pell 0 Jun 13 06:14 .history
-rw------- 1 pell pell 279426 Jul 17 12:17 .ICEauthority
drwx------ 3 pell pell 4096 Jan 13 2019 .kde
drwxrwxr-x 3 pell pell 4096 Jan 27 2018 .local
-rw-rw-r-- 1 pell pell 73 Dec 11 2018 .~lock.FILENAME copy.odt#
-rw-rw-r-- 1 pell pell 73 Jun 22 06:35 .~lock.NETSTAT -NALP ROOT modified.odt#
-rw-rw-r-- 1 pell pell 73 Jul 14 09:40 .~lock.NAMEFILE.odt#
-rw-rw-r-- 1 pell pell 73 Jun 2 10:40 .~lock.pub1.odt#
-rw-rw-r-- 1 pell pell 0 Jan 21 08:03 .~lock.NAME OF FILE 2020 copy.odt#
-rw-rw-r-- 1 pell pell 0 Jun 25 05:42 .~lock.NAME OF FILE.odt#
drwx------ 3 pell pell 4096 Nov 29 2018 .mozilla
-rw-rw-r-- 1 pell pell 1024 Jun 11 18:57 .NADXXX.odt.swp
drwxrwxr-x 2 pell pell 4096 Jun 11 18:56 .nano
-rw-rw-r-- 1 pell pell 1024 Jun 11 18:57 .newfile.swp
drwx------ 3 pell pell 4096 Jan 27 2018 .pki
-rw-r--r-- 1 pell pell 655 Jan 27 2018 .profile
dr-------- 3 root root 4096 Jul 13 11:06 .protonvpn-cli
drwx------ 2 pell pell 4096 Jun 20 09:57 .ssh
-rw-r--r-- 1 pell pell 0 Jan 27 2018 .sudo_as_admin_successful
drwxrwxr-x 3 pell pell 4096 Sep 11 2018 .thumbnails
drwx------ 5 pell pell 4096 Jul 14 12:09 .thunderbird
-rw------- 1 pell pell 664 Jul 12 06:13 .viminfo
-rw-r--r-- 1 root root 224 Jul 13 11:06 .wget-hsts
-rw-r--r-- 1 pell pell 0 Jan 27 2018 .Xauthority
-rw------- 1 pell pell 25179 Jul 18 01:04 .xsession-errors

Last edited by linx9; 07-18-2019 at 04:29 AM.
 
Old 07-18-2019, 10:53 AM   #20
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,718

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Please use [code] tags when posting output, for readability.

The files that start with ~lock and end with .odt are (probably) lock files from OpenOffice. They are very small, and probably don't contain any data. You could cat them to see what in them:
Code:
cat  .~lock.FILENAME copy.odt#
but, given that they are hidden files, I'd just ignore them.
Guessing that this is the home directory of the user pell, yes?
Everything else in that list appears to be user-specific "system" files that should NOT be deleted.

Frankly, I don't see anything to worry about. Just be aware that the ^T command in nano shows you hidden files. There's a reason that files are created that way: So people don't accidentally remove them

Look at what ls -l shows you. Almost nothing, right?
 
Old 07-18-2019, 11:52 PM   #21
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Please use [code] tags when posting output, for readability.

The files that start with ~lock and end with .odt are (probably) lock files from OpenOffice. They are very small, and probably don't contain any data. You could cat them to see what in them:
Code:
cat  .~lock.FILENAME copy.odt#
but, given that they are hidden files, I'd just ignore them.
Guessing that this is the home directory of the user pell, yes?
Everything else in that list appears to be user-specific "system" files that should NOT be deleted.

Frankly, I don't see anything to worry about. Just be aware that the ^T command in nano shows you hidden files. There's a reason that files are created that way: So people don't accidentally remove them

Look at what ls -l shows you. Almost nothing, right?
Thanks - sorry about no code tags.

It's not what is 'in' them, it is simply the 'file names' that concerns me. Yes, home directory of user. For the posting, I changed the real file names.

I will look for info about deleting hidden files, but maybe you or someone knows how to delete hidden files, soley the office docs. Part of the reason I want to do this is so I can educate someone else as to how to clean up their system as the names of files are revealing, even without any content.
 
Old 07-19-2019, 04:21 AM   #22
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
The lock files indicate the file is open and should normally be deleted when you close the file or exit the program unless something crashes. You can safely delete the lock files using the rm command. Make sure you include the first . In the file name.

In addition the .swp files are vim back up files and can also be safely deleted if desired but are ok. Everything else should be left as is.

Last edited by michaelk; 07-19-2019 at 04:24 AM.
 
Old 07-19-2019, 10:51 AM   #23
ttpp
Member
 
Registered: Jul 2019
Posts: 34

Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
The lock files indicate the file is open and should normally be deleted when you close the file or exit the program unless something crashes. You can safely delete the lock files using the rm command. Make sure you include the first . In the file name.

In addition the .swp files are vim back up files and can also be safely deleted if desired but are ok. Everything else should be left as is.
Thanks. What exactly is the "rm" command?
 
Old 07-19-2019, 11:54 AM   #24
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,718

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Quote:
Originally Posted by ttpp View Post
Thanks. What exactly is the "rm" command?
see
Code:
man rm
 
Old 07-19-2019, 12:01 PM   #25
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Quote:
should normally be deleted when you close the file or exit the program unless something crashes.
Just for clarification the lock files should automatically be deleted by Libre or Open office which ever you use and not manually by the user.

Last edited by michaelk; 07-19-2019 at 12:16 PM.
 
Old 07-20-2019, 05:12 PM   #26
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
see
Code:
man rm
Thanks.
 
Old 07-20-2019, 05:13 PM   #27
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Just for clarification the lock files should automatically be deleted by Libre or Open office which ever you use and not manually by the user.
Thanks. I was able to remove the .swp files and any "non" locked-libre files, but the libre ones are still there.
 
Old 07-20-2019, 05:22 PM   #28
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Was there any warning or error messages?
 
Old 07-21-2019, 09:54 AM   #29
linx9
LQ Newbie
 
Registered: Jul 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Was there any warning or error messages?
Thanks. Said file doesn't exist.
 
Old 07-21-2019, 10:06 PM   #30
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,148

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Lightbulb

Quote:
Originally Posted by linx9 View Post
Thanks. But, it seems like a history because the files are no longer on the computer, but the list of former files are. Either way, I want to delete whatever 'lists' there are. Simply, I don't want a "list" of the names of the deleted/cut-pasted files/ documents/ pictures ANYWHERE on my computer.

The file names I want to delete from 'ls -a' either have 'lock' at the beginning of the file name or ".swp' at the end.
If you can post an image of what you mean, then I think it will be more clearer and easier for others to help.
 
  


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
[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 10:49 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
Open Source Consulting | Domain Registration