Unable to delete broken directory - SOLVED

Using applications, configuring, problems
Post Reply
Message
Author
Roy
Posts: 451
Joined: Wed 31 Dec 2008, 18:31

Unable to delete broken directory - SOLVED

#1 Post by Roy »

I mistakenly disconnected or shut down an external hard drive prematurely (before the directory being written was finished) and ended up with a grey bordered yellow icon (! boldly centered in icon) that will not open, be renamed or deleted.

"chmod -R 777 /mnt/sdc1/directoryname" returns "chmod: cannot access '/mnt/sdc1/directoryname/': Input/output error"

Permissions cannot be changed via right-click GUI or Properties GUI.

How do I get rid of this directory? Using FatDog 6.00 here ATM, but it is an external HD that can be connected elsewhere.

-Roy
Last edited by Roy on Tue 03 Mar 2015, 17:26, edited 1 time in total.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

The Rube Goldberg way would be to copy everything except the bad directory from the partition, then reformat the partition and copy everything back to it.

I'm sure there's a better way, especially if you'd like to try to save what you could from the bad directory.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#3 Post by bigpup »

Have the drive plugged in, but not mounted.

Try running Gparted program.

Select the drive for Gparted to scan.

Right click on the drive partition and choose check.

See if maybe something is wrong with the file system on the partition.

This check will see if the file system is OK and also correct anything it finds wrong.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#4 Post by mikeb »

ntfs or fat...use windows to run a chkdsk on it.

if posix...ext2/3/4 fsck /dev/whatever will sort it out.

mike

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#5 Post by nic007 »

mikeb wrote:ntfs or fat...use windows to run a chkdsk on it.

if posix...ext2/3/4 fsck /dev/whatever will sort it out.

mike
I've used Windows on numerous occasions to fix the FAT drive which host my frugal puppies. Very easy to delete something in puppy (like a save file still in use/editing gone wrong, etc.) and boom, gone but not really gone permanently. You just see you have less space left on the drive and then it's Windows to come to the rescue. Do not get rid of Windows, especially if you have FAT and ntfs partitions.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#6 Post by Ted Dog »

lol so keeping windows to fix a problem caused by running linux as root, my suggest a more baby proof linux. Or not using a proprietary filesystem like NTFS.

I am always surprised by these types of problems, intermixing Windows with Linux on same hardware is worse than running them as two separate machines. Buy a second harddrive and be done with windows = problem solved.

As I type this I am aware most of us me included just like to have windows beaten back by our own choices and the problems caused is fun to fix and complain about.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#7 Post by nic007 »

Ted Dog wrote:lol so keeping windows to fix a problem caused by running linux as root, my suggest a more baby proof linux. Or not using a proprietary filesystem like NTFS.

I am always surprised by these types of problems, intermixing Windows with Linux on same hardware is worse than running them as two separate machines. Buy a second harddrive and be done with windows = problem solved.

As I type this I am aware most of us me included just like to have windows beaten back by our own choices and the problems caused is fun to fix and complain about.
Well, if I have to choose between Puppy and Windows XP Pro which I have, then I will have to go with Windows, it just works better in my particular circumstances. Windows is my primary system and installed on a second ntfs partition. Frugal puppies on a small FAT partition. I like being able to access all partitions from all operating systems.

Roy
Posts: 451
Joined: Wed 31 Dec 2008, 18:31

#8 Post by Roy »

Thanks to all!

I followed bigpups's suggestion and it worked on my 1.5TB ext2 drive -- or at least it removed the offending directory. I haven't checked to see if it corrupted any other files/directories, but I'm betting they are fine.

mikeb's suggestion would have probably worked, too -- but I'm no genius with the Command Line stuff and make my fair share of mistakes. Flash gave a definite solution -- but where to put 1.5TB of stuff in the meantime? (BTW Flash, thanks for cleaning up my original post for me.)

I am marking this as SOLVED. Thanks again.

-Roy

Post Reply