Deleting a file in Linux Mint

This is going to be such a easy one to answer, you will think He knows nothing …

Imagine I have a item of music on my desktop on linux mint.
I am fed up of hearing it so I select it with one click and press delete on the keyboard it confirms I want to delete it and it goes.
Or
I right click on it and select delete, asks to confirm and it goes
With me so far
On right click there is also a selection of put it in the trash, then I can empty trash when I go into that is caga file manager, select recycle bin and empty.
Easy.

But sometimes when I select delete, right click or delete key it goes into trash and is not deleted straight away.
How does linux mint choose go to trash or just delete totally
Do not pass go, do not collect 200 euros etc.

Trash or delete, that is the question.

Said it was easy.

3 Likes

Hi Paul,

Good question. Never considered it before. Most of the time a file will be sent to the trash bin.
I notice that if I hold down the shift key and hit delete, Mint will tell me the files will be deleted permanently.

3 Likes

The same question exists every time you use a gui to do anything.
It never tells you exactly what it it going to do when you click.
A button or icon should display the command(s) to be executed when you hover over it.
rm or mv that is the question

4 Likes

echo “alias rm=‘rm -i’” >> ~/.bashrc

Then future bash sessions will require confirmation when you try to delete a file with ‘rm’.

There is likely a similar setting in desktop environments too.

4 Likes

Howard got the idea,

How does the system decide trash or permanent delete

Is it to do with file size ?

There is no icon as such but yes a right click option. Still could delete permanent or go to trash

Hi Paul,
I’m sorry, but I really need you to clarify what you want: you’re in a desktop environment, and you want to permanently delete a file, is that it (translations are a bit difficult these days…)?
If that’s what you want, click on the document you want to delete permanently, then while holding down the SHIFT key, press the DELETE key.

In Linux Mint, if you press the right mouse key, you have a Delete option that deletes the file permanently, without sending it to the trash can:

image

Jorge

1 Like

Sorry I was not clear in my question

How does mint choose a document or music goes into trash or is directly deleted without a stop mid way on trash

On the Mac you delete it goes to trash then you empty trash. Linux appears to choose randomly

1 Like

Thanks Paul,
Mint sends everything to the trash, if you use the right mouse key and the option “Move to Trash” or press DELETE.

I don’t know if Mint deletes documents or directories using the above methods without sending them to trash.

If you want to delete “forever” without going to trash, use the “Delete” option when you press the right mouse key on the file or directory, or use the DELETE key while pressing the SHIFT key.

Is this what you want to know, or do you want to know which commands are behind these actions?

Jorge

2 Likes

Sorry
That is incorrect occasionally trash can other time just delete no consistency

1 Like

Hi Paul,
I apologize for what I’ve written, but it’s my experience with Linux Mint Cinnamon.

Jorge

1 Like

Please dont feel you need to apologise, we both see the same things but from a different perspective

I was copying a couple of cds last night and realised i copied in wrong format not wav, so deleted them but there were 2 cds and only half went in the bin the others were just totally deleted.

I was confused as to why and it did not appear to be ,logical

4 Likes

I wonder was the trash bin filesystem full?
It is in your home directory, inside .local
and
what a stupid place to put it.

3 Likes

Its where mint installs by default, just let it do it automatically without thinking.

No its not full, I empty regular and plenty of space on hard disk

With the mac, if you were working on a external disk or floppy, or usb. If you deleted the file went in to a trash on that media where it was deleted. That was also strange, take the disk out and the file stays in a seperate trash on that disk. But I digress with that.

3 Likes

Yeah, I was not accusing you of putting it there.
I guess it is there because there is a separate one for every user.

3 Likes

Hi Paul,

Perform a simple test on a file in /home.
Right click the file, choose delete and up pop message this will permanently delete the file.
If instead I just press the delete key on the PC, the file went to trash.
Interesting, but like you said, Why the difference?

3 Likes

That is a bug. Everything you delete from within the GUI is supposed to go to the Trash bin.
Only CLI commands like rm are supposed to delete permanently.

3 Likes

Hi Neville,
In Cinnamon I different: in the floating menu, when you press the right mouse key, you have 2 options: “Move to Trash” or “Delete”. Delete doesn’t send the files to trash:
image

Jorge

2 Likes

Hi Jorge,
That makes more sense
I wonder what your DEL key does?
Neville

1 Like

Hi Neville,
For me, “Delete” is a “GUI” of the rm command.
I still haven’t figured out how to find this setting, I’ve looked in .bashrc, but it’s not there. It’s possible that it’s something defined in Cinnamon itself, but I haven’t found it yet.


If I remember in Xfce, when you delete a file, never asks if you want to send it to Trash (correct me if it already does).
I had to make a script to make it ask before sending the file to Trash.
These small differences are characteristics of each DE (that’s my opinion)

Jorge

2 Likes

Glad you are finding the same as me on this, not a standard one does one two does two.

I am on lmde but 5he interface is cinnamon and file manage is caga the standard never done any changes to it. Think mate was the same but cannot remember and dont have any mate machines now, just spent a week updating everything to be the same cinnamon on lmde all 64 bit except one as its just too old, its my good to go in case of a system failure in our village so rare it sees the light of day, its more of a night animal.