View Full Version : ls cmd not working, Directory too large?

30th October 2007, 02:55 PM
I'm running FC5 and I'm fairly new to Linux (I know enough to be dangerous) :) .

I had some code running, sniffing packets and storing certain data in some log files. I left it run and forgot about it and noted after a few days that the directory it was in now shows up as 27+Mb when I execute "ls -al" from the parent dir.

I then CD'd to the dir to see what had happened but when I executed "ls" it did not return, I had to CTRL-C to break out.

I then tried to delete this directory (rm -rf) w/o success.

My questions:

How can I delete this directory if the mighty rm -rf didn't work?

Have I corrupted the dir structure/inodes somehow or exceeded a maximum limit?



30th October 2007, 03:16 PM
What did rm -rf return when you tried it?

If it is a large dir, it may take a while to get deleted.Also make sure you have privileges to delete those files (login as root and check the permissions and then run rm as root)

As a sample: I was backing up my colleague's HD at work before we reinstelled her OS. Unknown to me at the time, she had a recursive symlink in one of her subdirs leading that dir to be pulled in time and again. On top of that, I started the copy just before I left home so the copy was running overnight. In the morning, I had less than 10Mb free space on my 80Gig HD of which had ~60Gb free evening before :D It took somthing like 2-3 hours (forgotten exact time, but it was long) to remove that backup dir because of symlinks.

30th October 2007, 03:46 PM
I didn't let the rm -rf run long enough to get anything back, after about 90s I just did the CTRL-C to break out. Nothing was returned.

I will try again and let it run to see if it eventually deletes the dir.

I am logged in as root so there shouldn't be any permission issues.

thx, let you know what happens....

30th October 2007, 03:58 PM
Well thanks for the advise, I apparently was impatient, it took 7 minutes to delete the dir.

Thanks again!