Friends:
I'm using Ubuntu 18.04 LTS. My trash bin has numerous files, folders, .jpgs, .mpgs, etc., many of which I don't recognize as ever having used. I tried the normal "Empty Trash" method, that does nothing. I then tried every other terminal command I could find on the forum and elsewhere, including "rm"; I installed trash-cli and tried empty-trash
. After giving the rm
command to delete the trash folder, it's still there. I tried restoring the individual files (to alter and delete them) but get an error message that there's no such file or directory. Trying to delete them individually results in "You do not have sufficient permissions to delete the file [filename]." I can query properties, and the result shows content in the files (although some folders show no content.)
I am running a dual boot with Windows 10, and disabled "FastBoot" in Widows. Nothing works, although from the error messages and the lack of action, it seems like the files have been deleted. The behavior seems like what a Windows virus might be doing. The system seems to be running fine otherwise, although on restarts I sometimes get a green-colored screen with a multi-colored set of vertical lines in the left 10th of the screen. (I'm giving everything I can think of.)
I'm not very good at terminal commands, and don't really grok Ubuntu, although I can copy and paste what seems to be appropriate.
Here's a screenshot of the results of trash-empty:
ira@Ira-Ubuntu:~$ trash-empty Traceback (most recent call last): File "/usr/bin/trash-empty", line 5, in sys.exit(main()) File "/usr/lib/python2.7/dist-packages/trashcli/cmds.py", line 31, in empty ).run(*sys.argv) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 937, in run parse(argv) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 806, in __call__ self.default_action() File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 963, in _empty_all_trashdirs self.trashdirs.list_trashdirs() File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 880, in list_trashdirs self._for_each_volume_trashcan() File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 887, in _for_each_volume_trashcan self.emit_trashcans_for(volume) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 890, in emit_trashcans_for self.emit_trashcan_2_for(volume) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 903, in emit_trashcan_2_for self.on_trash_dir_found(alt_top_trashdir, volume) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 978, in _analize_trash_directory self.trashdir.each_trashinfo(self.on_trashinfo_found) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 1087, in each_trashinfo action(os.path.join(self._info_dir(), entry)) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 856, in delete_if_expired self._maybe_delete(trashinfo_path) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 866, in _delete_unconditionally self._trashcan.delete_trashinfo_and_backup_copy(trashinfo_path) File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 839, in delete_trashinfo_and_backup_copy self._file_remover.remove_file_if_exists(backup_copy) File "/usr/lib/python2.7/dist-packages/trashcli/fs.py", line 27, in remove_file_if_exists if os.path.exists(path): self.remove_file(path) File "/usr/lib/python2.7/dist-packages/trashcli/fs.py", line 25, in remove_file shutil.rmtree(path) File "/usr/lib/python2.7/shutil.py", line 253, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/usr/lib/python2.7/shutil.py", line 251, in rmtree names = os.listdir(path) OSError: [Errno 20] Not a directory: '/media/ira/6464-3839/.Trash-1000/files/0007.jpg'
I don't understand what it's telling me. Thanks for any help. Ira
Here are the first four lines resulting from the find /media/ command:
drwxr-xr-x 2 ira ira 32768 Sep 5 2014 /media/ira/6464-3839/Music
drwxr-xr-x 5 ira ira 32768 Sep 5 2014 /media/ira/6464-3839/.Trash-1000
drwxr-xr-x 2 ira ira 32768 Jun 4 2015 /media/ira/6464-3839/.Trash-1000/info
-rw-r--r-- 1 ira ira 70 Sep 5 2014 /media/ira/6464-3839/.Trash-1000/info/0007.jpg.trashinfo
Thereafter follow numerous lines like the 4th, with differences in the Trash-1000 files, and listing, I believe, the offending files. (I have successfully emptied the trash several times since 2014.)
I have the following external drives: 2 3-TB (containing some backup but mostly music I've recorded) and a pair of 1.5 TB drives in a D-Link backup server. I hope this helps.
By the way: I just deleted some files that showed up in the trash bin and I was able to delete them with the folder's empty command. The process worked for those files, but the stubborn ones weren't affected.
/media/ira/6464-3839/
) This can be a permission issue or some sort of drive corruption. Can you run a commandfind /media/ira/6464-3839/ -exec ls -ld {} \;
and edit your post to show the response – v010dya Apr 13 '19 at 1:21