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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error deleting deep directories 1

Status
Not open for further replies.

ghurtado

Programmer
Oct 29, 2001
2
US
HI!,

I am having awful trouble as the result of my stupidty. I wanted to copy a whole bunch of files on my virtual server from the current directory to a directory directly in it. So I thought typing 'cp -r ./* other_dir/' would be a good idea. For anyone who's ever tried this, suffice it to say I created a big mess. Even though I killed the process once I realized what was going on, it was too late, and the shell had started to create directories inside of directories under 'other_dir', probably nested like 50 or 60 levels deep. So I thought, 'no big deal, I can fix this with a recursive rmdir', but now that doesn't work because the directories go too deep and the deepest one isnt being recognized properly by the shell. When I try to erase it I get 'Numerical out of range'. I assume that the 'rm' and 'rmdir' programs get confused because of the long path. What can I do? How do I get rid of the directories?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top