Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
To run fsck (File System ChecK) on your root (/) partition, first of all you need to mount in read-only. In order to do that, I first enter runlevel 1. Type on a terminal
Code:
# telinit 1
as root, or using sudo. Then login as root, if necessary and mount your root partition read-only:
Code:
# mount / -o remount,ro
Next step, force a fsck on that (assuming your root partition is sda1):
Code:
# fsck -f -v /dev/sda1
When the check is done, mount it read-write and either reboot or enter your previous runlevel with telinit:
To run fsck (File System ChecK) on your root (/) partition, first of all you need to mount in read-only. In order to do that, I first enter runlevel 1. Type on a terminal
Code:
# telinit 1
as root, or using sudo. Then login as root, if necessary and mount your root partition read-only:
Code:
# mount / -o remount,ro
Next step, force a fsck on that (assuming your root partition is sda1):
Code:
# fsck -f -v /dev/sda1
When the check is done, mount it read-write and either reboot or enter your previous runlevel with telinit:
Code:
# mount / -o remount,rw
# shutdown -r now
Thank you very much for your help, but I suppose being too newbie to understand all those "mount" "unomunt" stuff.
For instance, how could I know "my root partition is sda1" ?
If I call mount:
Code:
mount
/cow on / type overlayfs (rw,commit=0,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
/dev/sdb1 on /cdrom type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/passegua/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=passegua)
Open a terminal and enter this: gksu nautilus or gksudo nautilus. Navigate to your Trash folder and open the files and info folders separately or whatever you want to delete. You can Select All or select individually to highlight files. When you have them highlighted, hold down the Shift and Delete keys and you will be prompted and asked if you want to delete whatever files are highlighted. I've done this on Ubuntu 10.10 and 11.10 and I think I found this solution on the Ubuntu forums after trying several of the standard methods suggested above which didn't work either??
Open a terminal and enter this: gksu nautilus or gksudo nautilus. Navigate to your Trash folder and open the files and info folders separately or whatever you want to delete. You can Select All or select individually to highlight files. When you have them highlighted, hold down the Shift and Delete keys and you will be prompted and asked if you want to delete whatever files are highlighted. I've done this on Ubuntu 10.10 and 11.10 and I think I found this solution on the Ubuntu forums after trying several of the standard methods suggested above which didn't work either??
Impossible.
This is the error message:
Error finding file stat "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A/85658d01": input/output error
Hello,
Maybe the file is in use. Go into single user mode, then try it. init 1 will goto into single user mode.
cheers
Indeed I thought the same as in windows some times you cannot delete a file in use.
But I restarted as single user and the input-output error is still there, impossible remove.
Well ubuntu is keeping well hidden its secrets :-)
Another suggestion.
I just ran another test and put a photo called "Wolf.jpg" in the trash through my file manager dolphin. Based on the test I did from command line posted below, I had to specify the name of the file, using a wild card did not work.
Code:
jo@jo:~$ sudo rm /root/.local/share/Trash/files/*
[sudo] password for jo:
rm: cannot remove `/root/.local/share/Trash/files/*': No such file or directory
jo@jo:~$ sudo rm /root/.local/share/Trash/files/Wolf.jpg
jo@jo:~$
I have had similar issues in Windows, where I could not delete certain files, but rebooting into Linux or Mac OSX and deleting from there most often would do the trick. There was the odd time where I could not do it from any OS, probably because there was an error in Windows MFT where it still reported an existing file that actually did not exist anymore. If this is your case, even if the file does not exist, the space will not be marked as free space and cannot be written to.
Last edited by Brains; 12-04-2011 at 06:17 PM.
Reason: Wrong thread, having iceweasel issues, woops, it was the right tread.
Since your Ubuntu is on a pendrive, have you considered the idea of just mounting the disk into another OS to delete those files!?!?
it's not an "elegant solution", but it might be a workaround...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.