Mistake while emptying trash -- help
Hi NMGLUG folks, I made a mistake. Here's what I did: ll@leno:~/.local/share/Trash$ ls files info ll@leno:~/.local/share/Trash$ rm -rf * ll@leno:~/.local/share/Trash$ ls ll@leno:~/.local/share/Trash$ mkdir files ll@leno:~/.local/share/Trash$ mkdir info ll@leno:~/.local/share/Trash$ ls files info ll@leno:~/.local/share/Trash$ After I removed files from the Trash dir, I realized that I should have changed to the files dir and removed files in there. Unfortunately, I lost whatever was in the info dir. Also, I recreated the files and info folders, but they are probably not the same now as they were before. I'm not sure what is different, maybe folder attributes or other stuff. Now, when I delete a file, I don't see it in the files dir. What should I do? Please help. LeRoy -- There is something glorious birthing within all of us. (New for 2021) I am the Love of God, no matter what. LeRoy Diener 213-LEROYIZ 213-537-6949 www.leroydiener.com/
First, a strong caution: you absolutely do not want an "rm -rf *" in your shell's history. I find that one way of avoiding possibly problems with repeating history while in the wrong dir is to do something like "rm -rf ../Trash/*" As to your current question: if you just want to know the typical permissions on those dirs, below is what mine look like, so you can probably just do "mkdir files && chmod 700 files" and "mkdir info && chmod 700 info". Trash $ pwd /home/markgalassi/.local/share/Trash Trash $ ls -la total 20 drwx------ 5 markgalassi markgalassi 4096 Feb 3 2021 . drwxrwxr-x 51 markgalassi markgalassi 4096 Oct 21 09:49 .. drwx------ 2 markgalassi markgalassi 4096 Jun 30 22:00 expunged drwx------ 3 markgalassi markgalassi 4096 Oct 14 14:12 files drwx------ 2 markgalassi markgalassi 4096 Oct 14 14:12 info Trash $
Maybe not helpful for Leroy (or even avoiding his particular goof), but the trash-cli package is helpful for those who do file management on the command line Sent from my iPhone
On Oct 21, 2021, at 10:43 AM, Mark Galassi <mark@galassi.org> wrote:
First, a strong caution: you absolutely do not want an "rm -rf *" in your shell's history. I find that one way of avoiding possibly problems with repeating history while in the wrong dir is to do something like "rm -rf ../Trash/*"
As to your current question: if you just want to know the typical permissions on those dirs, below is what mine look like, so you can probably just do "mkdir files && chmod 700 files" and "mkdir info && chmod 700 info".
Trash $ pwd /home/markgalassi/.local/share/Trash Trash $ ls -la total 20 drwx------ 5 markgalassi markgalassi 4096 Feb 3 2021 . drwxrwxr-x 51 markgalassi markgalassi 4096 Oct 21 09:49 .. drwx------ 2 markgalassi markgalassi 4096 Jun 30 22:00 expunged drwx------ 3 markgalassi markgalassi 4096 Oct 14 14:12 files drwx------ 2 markgalassi markgalassi 4096 Oct 14 14:12 info Trash $ _______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
Hi NMGLUG folks, Still not working right. I tried what Mark Galassi said and a few variations of that. I got the file permissions to show up as drwx-------- from the chmod 700 approach and also from copying in new folders from a backup of the home directory, but still not working right. When I say "working right" in this context, it is this: When I delete a file in some folder, I get a prompt "Delete 1 selected item?" When I click yes, that filename appears in the Trash directories file and info. When I say "not working right" in this context, it is the same as above, but the Trash directories file and info remain empty. It appears that disk space is getting freed up. Other than that, I'm not sure if the files are getting deleted or what is happening. Any help? (By the way, thanks for everyone's help over the years.) LeRoy -- There is something glorious birthing within all of us. (New for 2021) I am the Love of God, no matter what. LeRoy Diener 213-LEROYIZ 213-537-6949 www.leroydiener.com/ On Thu, Oct 21, 2021 at 11:47 AM Art Barnes <art@pin2.io> wrote:
Maybe not helpful for Leroy (or even avoiding his particular goof), but the trash-cli package is helpful for those who do file management on the command line
Sent from my iPhone
On Oct 21, 2021, at 10:43 AM, Mark Galassi <mark@galassi.org> wrote:
First, a strong caution: you absolutely do not want an "rm -rf *" in your shell's history. I find that one way of avoiding possibly problems with repeating history while in the wrong dir is to do something like "rm -rf ../Trash/*"
As to your current question: if you just want to know the typical permissions on those dirs, below is what mine look like, so you can probably just do "mkdir files && chmod 700 files" and "mkdir info && chmod 700 info".
Trash $ pwd /home/markgalassi/.local/share/Trash Trash $ ls -la total 20 drwx------ 5 markgalassi markgalassi 4096 Feb 3 2021 . drwxrwxr-x 51 markgalassi markgalassi 4096 Oct 21 09:49 .. drwx------ 2 markgalassi markgalassi 4096 Jun 30 22:00 expunged drwx------ 3 markgalassi markgalassi 4096 Oct 14 14:12 files drwx------ 2 markgalassi markgalassi 4096 Oct 14 14:12 info Trash $ _______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
Make sure you have fully logged out, or maybe even rebooted, since some processes in your desktop might keep an open file descriptor on a directory (unlikely but possible), so you want to restart that. I don't understand at all what you are saying; it appears form your words that files both appear and don't appear. But in any case, the graphical interface is not the final arbiter of whether files are around or not. After your reboot (if you had not yet done that), do a: 1. Make a file called junk_special_name.txt with some junk in it. 2. Delete it the way you are saying, when you say you cannot then find it. 3. Run "find ~ -name junk_special_name.txt" at the shell and see what comes up. You can also try the very unlikely to be relevant "sudo find /tmp/ -name junk_special_name.txt"
LeRoy & NMGLUGers, Is there, perhaps, a difference between "Delete" and "Move to Trash" in the GUI? "Delete" seems to act like 'rm' in my system. "Move to Trash" acts like 'mv ./someFile.txt ~/.local/share/Trash/files someFile.txt' That is: from any of my directories below my home folder "Move to Trash" moves a file to my ~/.local/share/Trash/files/ sub-directory. However, I am using Xubuntu, but consider that the GUI in most cases operates the same way and obscure the command that is actually executed. I don't know if this will be helpful. Thank you, Ted P On Fri, Oct 22, 2021 at 5:39 PM Mark Galassi <mark@galassi.org> wrote:
Make sure you have fully logged out, or maybe even rebooted, since some processes in your desktop might keep an open file descriptor on a directory (unlikely but possible), so you want to restart that.
I don't understand at all what you are saying; it appears form your words that files both appear and don't appear. But in any case, the graphical interface is not the final arbiter of whether files are around or not. After your reboot (if you had not yet done that), do a:
1. Make a file called junk_special_name.txt with some junk in it.
2. Delete it the way you are saying, when you say you cannot then find it.
3. Run "find ~ -name junk_special_name.txt" at the shell and see what comes up. You can also try the very unlikely to be relevant "sudo find /tmp/ -name junk_special_name.txt" _______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
Hi NMGLUG folks, Thanks again. Ted: your ideas make sense. Mark: I tried your suggestions. I'll explain better what I wrote on 22 Oct. Ted explained it well. When this feature was "working right", when I deleted a file from the Desktop folder, the filename disappeared from Desktop and the filename appeared in Trash/files and Trash/info. To resonate with Ted, that functionality seems to match the mv command with the addition of also creating a file in Trash/info, presumably that file having nothing but the path which the file was moved from. That functionality seems to have stopped now in my OS. When I delete a file now, it seems to match the rm command. I used the find command in several scenarios with some files which I deleted, some files I moved, etc. The results matched what I wrote above. Using sudo gave the same results. Rebooting gave the same results. Any ideas about how to regain the original functionality, so that files deleted using GUI will be moved to Trash? LeRoy -- There is something glorious birthing within all of us. (New for 2021) I am the Love of God, no matter what. LeRoy Diener 213-LEROYIZ 213-537-6949 www.leroydiener.com/ On Fri, Oct 22, 2021 at 9:49 PM Ted Pomeroy <ted.pome@gmail.com> wrote:
LeRoy & NMGLUGers, Is there, perhaps, a difference between "Delete" and "Move to Trash" in the GUI? "Delete" seems to act like 'rm' in my system. "Move to Trash" acts like 'mv ./someFile.txt ~/.local/share/Trash/files someFile.txt' That is: from any of my directories below my home folder "Move to Trash" moves a file to my ~/.local/share/Trash/files/ sub-directory. However, I am using Xubuntu, but consider that the GUI in most cases operates the same way and obscure the command that is actually executed. I don't know if this will be helpful. Thank you, Ted P
On Fri, Oct 22, 2021 at 5:39 PM Mark Galassi <mark@galassi.org> wrote:
Make sure you have fully logged out, or maybe even rebooted, since some processes in your desktop might keep an open file descriptor on a directory (unlikely but possible), so you want to restart that.
I don't understand at all what you are saying; it appears form your words that files both appear and don't appear. But in any case, the graphical interface is not the final arbiter of whether files are around or not. After your reboot (if you had not yet done that), do a:
1. Make a file called junk_special_name.txt with some junk in it.
2. Delete it the way you are saying, when you say you cannot then find it.
3. Run "find ~ -name junk_special_name.txt" at the shell and see what comes up. You can also try the very unlikely to be relevant "sudo find /tmp/ -name junk_special_name.txt" _______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
_______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
LeRoy, By way of a possible solution, keeping in mind Mark's caution about never having a blanket 'rm' command in your history, I wonder if you could add a user to your system and see if that user has the default Move to Trash and Delete GUI commands working. OR: re-install your desktop application, which is lxde-desktop as I recall, to see if the missing pieces are restored. As your original error was done as User, not Root, you may still have all the necessary parts available or in the repository for your desktop environment. The old, tried and true resolution is 1)Backup your files; 2)Fresh install of latest version of your OS. Don't back up .local settings as these may contain the problem. In fact, except for the ".browser-of-choice" settings and your address book most settings for the desktop and other applications may not be compatible with an Upgraded system. So, do a backup and then decide how much of a repair you want to try. Also, you may want to wait to see if others have suggestions or comments on my comments. Thank you, Ted P On Sun, Oct 24, 2021 at 7:43 PM LeRoy Diener <leroy@choosetherightside.com> wrote:
Hi NMGLUG folks,
Thanks again. Ted: your ideas make sense. Mark: I tried your suggestions. I'll explain better what I wrote on 22 Oct. Ted explained it well.
When this feature was "working right", when I deleted a file from the Desktop folder, the filename disappeared from Desktop and the filename appeared in Trash/files and Trash/info. To resonate with Ted, that functionality seems to match the mv command with the addition of also creating a file in Trash/info, presumably that file having nothing but the path which the file was moved from. That functionality seems to have stopped now in my OS. When I delete a file now, it seems to match the rm command.
I used the find command in several scenarios with some files which I deleted, some files I moved, etc. The results matched what I wrote above. Using sudo gave the same results. Rebooting gave the same results.
Any ideas about how to regain the original functionality, so that files deleted using GUI will be moved to Trash? LeRoy -- There is something glorious birthing within all of us. (New for 2021) I am the Love of God, no matter what. LeRoy Diener 213-LEROYIZ 213-537-6949 www.leroydiener.com/
On Fri, Oct 22, 2021 at 9:49 PM Ted Pomeroy <ted.pome@gmail.com> wrote:
LeRoy & NMGLUGers, Is there, perhaps, a difference between "Delete" and "Move to Trash" in the GUI? "Delete" seems to act like 'rm' in my system. "Move to Trash" acts like 'mv ./someFile.txt ~/.local/share/Trash/files someFile.txt' That is: from any of my directories below my home folder "Move to Trash" moves a file to my ~/.local/share/Trash/files/ sub-directory. However, I am using Xubuntu, but consider that the GUI in most cases operates the same way and obscure the command that is actually executed. I don't know if this will be helpful. Thank you, Ted P
On Fri, Oct 22, 2021 at 5:39 PM Mark Galassi <mark@galassi.org> wrote:
Make sure you have fully logged out, or maybe even rebooted, since some processes in your desktop might keep an open file descriptor on a directory (unlikely but possible), so you want to restart that.
I don't understand at all what you are saying; it appears form your words that files both appear and don't appear. But in any case, the graphical interface is not the final arbiter of whether files are around or not. After your reboot (if you had not yet done that), do a:
1. Make a file called junk_special_name.txt with some junk in it.
2. Delete it the way you are saying, when you say you cannot then find it.
3. Run "find ~ -name junk_special_name.txt" at the shell and see what comes up. You can also try the very unlikely to be relevant "sudo find /tmp/ -name junk_special_name.txt" _______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
_______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
_______________________________________________ nmglug mailing list nmglug@lists.nmglug.org http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org
participants (4)
-
Art Barnes -
LeRoy Diener -
Mark Galassi -
Ted Pomeroy