I'm trying to delete the .Trash-1000 from my pen drive, but with
sudo rm -rf .Trash-1000/
I got
rm: cannot remove `.Trash-1000/expunged/2660089871/apps.log': Read-only file system
(one line of this for each file within .Trash-1000/
)
I found this similar question, but I still got the same result after running:
sudo mount -o remount,rw '/media/SGTL MSCN'
sudo rm -rf .Trash-1000
So, any idea how to remove this folder (or its content)?
By the way, I need to remove it because I'm using the pen drive to test a software, and there's a file there that should not be found in the pen drive.
--update
I thought it was corrupted, like Allan pointed, but the same just happened to another new pen drive I plugged here.. After use it on VMWare (in a new OS that still don't have a name), and go back to Ubuntu, I can no more edit it's files, nither make a filesystem check or format it.
If I were to guess it sounds to me like your Pendrive is corrupted. the simple solution is to back-up and reformat however if you want to find out if it is really corrupted or not which could be a sign of a failing flash drive use
fsck
first back-up your pendrive/card then find out what mount point its under eg. /dev/sdb , /dev/sdc etc.
You can find this information in disk utility under the heading Device:
in the screen shot it is /dev/sdb1
You can then modify these commands and run each
Alternatively you can click "check file system" after unmounting the drive in disk utility
Edit:
I have found another solution to this problem the steps are as follows
gksu palimpsest
Hopefully this will work if all else has failed
i had a similiar issue. I was doing a backup of a partition with "Redo Backup" to a usb drive. I had to cancel the backup, and the files could not be deleted. The files were in the Trash and still on my external drive, but I could'nt delete any of those, even as root.
My solutuion was to boot Windows (I still use it for playing games), and then I could delete the files. Maybe booting from a Live CD helps, or you plug the USB drive to a other computer running a diferent OS. I know this is a bit lame, but it was the quickest solution for me.
Open the disk utility(Type "disk" in search and click on the first application) then after opening of the application click on your pendrive name screenshot1
Then, click on the white space(In my case its written "Sony partition 1 32gb") screenshot2
Then, click on "setting" icon and select "Format Partition".The below screen will appear.Enter "volume name" and in "type" choose "for use with all systems and devices(FAT)" screenshot3
Then press "next" > press "format". You are done.
For the case of emptying the trash on a pen drive, this ubuntuforums.org page addresses a similar situation.
One solution discussed on that page is to select the .Trash-1000 folder in the File Manager and then press <Shift>-<Delete>.
Upon doing this, the file manager pops up a dialog indicating the action is irreversible and queries whether to continue or not.
This solution is known to work on other Linux distributions.
This should hopefully fix your issue, I had the problem few days back where even if I owned folder I couldn't delete content cause folder was not executable -R if u have recursive folders
Hope that does it for you