Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete a bad dir?

Status
Not open for further replies.

wlf

Technical User
Sep 25, 2002
47
0
0
US
Hi, I have a bad dir ipcheck, there is some files in that and can't see them from ls. Here is what I tried to remove the dir and files in it.

# ls ipcheck
#
# rm -rf ipcheck
rm: Unable to remove directory ipcheck: File exists
#
# ls -b ipcheck
#
# /bin/rm -fr ipcheck
rm: Unable to remove directory ipcheck: File exists
#
# cd ipcheck
#
# ls
.: No such device or address
#
# cd ..
..: bad directory

# /bin/rm -fr ipcheck
rm: Unable to remove directory ipcheck: File exists
#

How to solve it ? Thanks. -wolf
 
They are probably just file names that start with period.
Try ls -la
 

rm -rf would have removed dot files if there wasn't a problem.
 
man fsck

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for all your replies. I did fsck without unmont and the output is

** /dev/rdsk/c1d1s2
** Currently Mounted on /u05
** Phase 1 - Check blocks and Sizes

CANNOT READ: BLK 177600
CONTINUE? y

THE FOLLOWING SECTORS COULD NOT BE READ: 177613 177634 177635 177636 177637 177638 177639 177640 177641 177642 177643 177644 177645 177646 177647 177648 177649 177650 177651 177652 177653 177654 177655 177656 177657 177658 177659 177660 177661 177662 177663 177664 177665 177666 177667 177668 177669 177670 177671 177672 177673 177674 177675 177676 177677 177678 177679 177680 177681 177682 177683 177684 177685 177686 177687 177688 177689 177690 177691 177692 177693 177694 177695 177696 177697 177698 177699 177700 177701 177702 177703 177704 177705 177706 177707 177708 177709 177710 177711
PARTIALLY ALLOCATED INODE I=11032
CLEAR? THE FOLLOWING SECTORS COULD NOT BE READ: 177613 177634 177635 177636 177637 177638 177639 177640 177641 177642 177643 177644 177645 177646 177647 177648 177649 177650 177651 177652 177653 177654 177655 177656 177657 177658 177659 177660 177661 177662 177663

...

Sounds like a bad sector. Any other ideas? Thanks. -wolf
 
Seems your hard drive is likeky to die.
Hopefully you have a valid backup of the data and some money for a new disk ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top