Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2002
    Location
    Fountain Valley, CA
    Posts
    219

    Question Cannot delete a directory

    I restored a raq and two strange directories popped up during the restore process.

    I was able to delete the first directory, but there is a directory, ^^^0

    the ^ represents spaces. When I try to delete it, I get the error, no such file or directory.

    I am reasonably sure that there was no hack. I checked the logs, I installed ssh immediately.

    I ran chkrootkit and it found nothing.

    How do I delete this?
    We're all humanary stew, if we don't pledge allegiance to the Black Widow

  2. #2
    Join Date
    Nov 2001
    Location
    Vancouver
    Posts
    2,416
    Well good for you for being scared and installing ssh. That should have been step 1!

    Answer:
    rm -r ' O'

    (i.e. rm -r '^^^O')
    “Even those who arrange and design shrubberies are under
    considerable economic stress at this period in history.”

  3. #3
    Join Date
    Feb 2002
    Location
    Fountain Valley, CA
    Posts
    219
    Thanks for the info. I will try it. BTW, ssh was the first step, after the restore and before the patches. ;-)
    We're all humanary stew, if we don't pledge allegiance to the Black Widow

  4. #4
    Join Date
    Feb 2002
    Location
    Fountain Valley, CA
    Posts
    219
    No go, still get the confounded no such file or directory.
    We're all humanary stew, if we don't pledge allegiance to the Black Widow

  5. #5
    Join Date
    Nov 2001
    Location
    Vancouver
    Posts
    2,416
    Perhaps it isn't "spaces" that are leading the O then.

    Be careful with this, but

    rm -r *O*

    will delete any file with O in its name
    or any dir with O in its name in any position

    capital O, of course.

    Be careful nothing else within the current directory matches that pattern or you lose that too.

    Backups are a good thing...
    “Even those who arrange and design shrubberies are under
    considerable economic stress at this period in history.”

  6. #6
    Join Date
    Feb 2002
    Location
    Fountain Valley, CA
    Posts
    219
    That did the trick! Thanks!!!
    We're all humanary stew, if we don't pledge allegiance to the Black Widow

  7. #7
    Join Date
    Nov 2001
    Location
    Vancouver
    Posts
    2,416
    très bien!
    “Even those who arrange and design shrubberies are under
    considerable economic stress at this period in history.”

  8. #8
    Join Date
    Sep 2001
    Posts
    238
    for future reference, to make a space appear I think you prefix it with a \
    So "The Day" would be "The\ Day"
    The \ causes the space to be considered one, instead of as a seperator. Using that, to get \ you might need to do \\, but I am not sure.

  9. #9
    Join Date
    Sep 2002
    Location
    Mansfield
    Posts
    314
    I'd suggest using ls before rm to see if the pattern was right.

    ls -i will show the inode and tell you if it's a regular file or not.

    ls *O* first.
    The pedantically correct way to do it is to mv the file first to a correct name so no data is lost.

    mv *O* badfile
    rm badfile

    I have no idea if any of this works on a Cobalt.

    My .02
    GUI admin tools have no honor. It is a good day to vi.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •