Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my portable Store Jet "Transcend" some folders (kept from previous OS Windows) got unmovable and unnecessary. How to remove them?
Normal way "move to trash" doesn't work (computer writes "error" or "the file is not empty").
Neither helps Beach Bit.
Terminal writes "no such file in directory" -- and what is a proper command?
Thank you.
what kind of filesystem is it? Probably would be better to save what you need and reformat the whole storage.
Without details hard to say more. There can be hidden or strange chars in filenames, there can be hardware error or corrupted filesystem or just a mistyped command. Or something else.
I Presume this is a ntfs drive? Or is it udf?
Have you tried something like this?
Code:
mount /dev/nutty-drive /media
rm -ri /media/*
It should spit you up a confirmation dialogue for each directory. There's things like Recycle.Bin which is listed as /media/$Recycle.Bin, and that '$' has to be escaped, i.e.
rm -rf /path/to/\$Recycle.Bin
what kind of filesystem is it? Probably would be better to save what you need and reformat the whole storage.
Without details hard to say more. There can be hidden or strange chars in filenames, there can be hardware error or corrupted filesystem or just a mistyped command. Or something else.
Thanks for replying. My filesystem is Ubuntu 22.04 LTS. I think about reformatting too. Just hope for some sudo rm or unknown to me Linux tool which kicks whatsoever.
PS Another strange thing is that to get an answer from this forum, I have to (get out and) reenter it. Otherwise, it feels like nobody give a damn.
I Presume this is a ntfs drive? Or is it udf?
Have you tried something like this?
Code:
mount /dev/nutty-drive /media
rm -ri /media/*
It should spit you up a confirmation dialogue for each directory. There's things like Recycle.Bin which is listed as /media/$Recycle.Bin, and that '$' has to be escaped, i.e.
rm -rf /path/to/\$Recycle.Bin
Thanks. The code (if it's not a joke) didn't help.
Terminal answered: <special device /dev/nutty-drive does not exist>.
The "ntfs" it is.
The Transcend is a portable hard drive, StoreJet 25M3, USB 3.0.
When I open <hidden files>, it additionally shows
<.Trash-1000>.
The "stubborn" folder to be removed shows 4 folders, all responding as <the folder contents could not be displayed>.
Back up all valuable data and make a new partition of your choice Ext4 is the all-purpose file system, but there are others with their own peculiar strengths. I stick with ext4 for the repair tools, and I don't fit any of the use cases for the more exotic distros.
Terminal answered: <special device /dev/nutty-drive does not exist>.
THe 'nutty-drive' was an example so it is up to you to use or create a specific mount point wherever you wish but usually done in the /mnt or /media directories. Then you mount it.
Quote:
(computer writes "error" or "the file is not empty").
Was it actually 'folder is not empty'? Delete the sub-folders first. rm -rf dirname should do the job only if you have the full path to the correct directory or are in the directory immediately above the directory you want to remove.
Or do what is suggested in post 6 which might be simpler if you have no data there you want to save.
Last edited by yancek; 05-01-2024 at 06:41 AM.
Reason: clarity
I reformatted my Toshiba 1TB drive that was NTFS to BTRFS file system because it lost everything stored in it while copying and pasting files from it.
Gparted handled that. I blame the NTFS file system for losing my backups. Now have only one from another laptop, but copy and paste.
Mount and dis mount. Work like they should.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.