when i try to remove directory /run/media/user/usb_name/.Trash-1000 using rm commnde it give me the following output :
rm: cannot remove '.Trash-1000/files/.thunderbird': Directory not empty
when i try to remove directory /run/media/user/usb_name/.Trash-1000 using rm commnde it give me the following output :
rm: cannot remove '.Trash-1000/files/.thunderbird': Directory not empty
It is, as the message says, a directory (a folder) with other stuff in it
use
rm -r
(remove recursively)
this will prompt you for each and every file that is there
rm -rf
will skip these questions and just do what you asked, no matter what or how many, how much is in there
Be very sure that you really want that, there is no coming back from this!
⌠or just use the file manager and empty the trash âŚ
thank you for reply i try all the the commande you mentioned above but no result
I did not provide full commands (and intentionally so).
I just told you how to use the commandâs switches, altering how it behaves.
the difference is in
rm
(what you used)
vs
rm -r
(to remove recursively)
The former will only delete the one specific file (which you didnât specify)
It will not let you delete a directory with other files and directories still in it.
The latter will recursively delete the directory and everything in it.
man rm
will tell you about these and other switches and what they do
i get you bro it does not work
Just empty the trash can using your file manager.
If you want to be be more surgical/selective, as is appears to be the case
and want to remove everything inside:
/run/media/user/usb_name/.Trash-1000/files/.thunderbird
use:
rm -rf /run/media/user/usb_name/.Trash-1000/files/.thunderbird/*
(note the asterisk at the end)
The effect will be:
the directory
/run/media/user/usb_name/.Trash-1000/files/.thunderbird
will still be there - but it will be empty - all the files that where in it will be gone for good
⌠of course, that path is not real (which is a good thing)
because the âusb_nameâ and the âuserâ part of it is something you ⌠redacted
I wonder why youâd, letâs say: insist
in using the raw command line.
Which you clearly do not know how to use.
Why not just use a file manager?
It would make the task so much easier - and youâd actually see the directory structure that you are dealing with.
âmcâ is a good one, if you want to stay in the terminal
(you have to first install it - itâs not there by default)
In case you did not know:
what you are trying to do here is
deleting something from the trash can - something that has already been deleted - but is still there in the trash
and can be âresurrectedâ any time
You are trying to delete some of the already deleted stuff
so that it cannot be brought back.
The same issue happened to me today trying to delete a directory in an usb disk. There were errors in the file system that prevented me from doing that. Use Gparted to verify the filesystem on the usb stick.
but the reason the OP canât delete what they want to is not because of filesystem errors - but because of not understanding how to do what they want to do
The commands donât work for them because both the command as well as the path is incorrect.
May be, but if the path is wrong the error message should be âdirectory not foundâ, not âdirectory not emptyâ (it seems he also tryed ârm -rfâ), that was what made me think it was the same issue I had todayâŚ
first post
he tried to remove a directory
and was told that it wasnât empty
Me saying what I said was just a summary of of what I saw them doing and why that failed âŚ
Why not let them figure it out?
I explained it as best I could.
You would want to keep that folder: Trash management - ArchWiki
As @Nachlese said earlier, you would rather want to use your file manager instead to empty the trash.
I think it will be recreated sometime after he deleted it becaus the system does need it.
And at the right time he will learn that files starting with a dot belong to the system. And that it may do harm to his system when he interferes with them at his own will.
The system can also be a beast
man rm
but this file is created in USB after deleting something from it and for my situation i dont want the file to be created because it allow the recover deleted file
The Trash directory wonât be created if you donât use your graphical file manager.
Which is likely not the route you want to go.
It simply being there doesnât mean that something you delete can be recovered.
Just donât put it in the trash bin in the first place.
There is always an option to âreally deleteâ whatever.
Usually you hold down âCTRLâ or âShiftâ while you select and delete something
which will then be directly and permanently deleted.
You may have to first enable the presence of this option in the settings of your file manager.
But I donât know the file manager used in LXQT and where to find that option in itâs settings.
i am using thunar file manger
The menu on top:
Edit â Preferences â third Tab (Behavior) â the check box at the bottom (Context Menu)
i will take it in consideration for future thank you
But be aware that even without â.Trashâ it is often possible to recover deleted files if you know how to do it (especially on USB, when the filesystem is FAT).
search for âphotorecâ
I had kinda hoped that no one would go there, to mention that rabbit hole