Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

File exists on a Synology 5-Bay NAS.

It appears there was an error with the file name, it contains two invalid characters as well as a few others that were changed. (I have the original file elsewhere).

I just want to delete it entirely, i have a copy of it but the fact the broken one "exists" is messing with one of my Syncback jobs. (cant copy, move, delete, rename.)

I have waited a day to try again and the problem still persists. Not entirely sure when the problem started though.

Attached are two screenshots, one from windows explorer, the other from SSHing into the NAS and attempting to delete it that way.

(NOTE: the file path has been blurred, but is nowhere near the limit for windows, path is 127 characters, file name is 37 characters, totaling 165 characters.)

Windows Explorer attempt: Item not found for deletion

SSH attempt: ssh no such file or directory

share|improve this question
4  
Can you rm with wild cards in the ssh shell? Like rm Kinetix__Vrvo*.L5X? –  Werner Henze Jul 10 '13 at 15:11
3  
BTW, in ssh you wrote Kinetix_Vrvo, in the explorer it is Kinetix__Vrvo!? –  Werner Henze Jul 10 '13 at 15:12
    
Yeah, in explorer it looks like two _ but in SSH its just one. that file name is copied from what the ls gave me. Wow, I don't know how I didn't think to try wildcards. I ran 'rm Kinetix*' and it deleted the bad file and the other Kinetix file in the directory. I didn't expect that to work, thanks! –  Fooxz Jul 10 '13 at 15:20

1 Answer 1

up vote 3 down vote accepted

There are a few things you can try (assuming the NAS is running some kind of Gnu/Linux):

  • rm Kinetix*.L5X
  • find -name "Kinetix*.L5X" -delete, assuming your find supports -delete, if it doesn't use this instead: find -name "Kinetix*.L5X" -exec rm -i '{}'
  • Delete it using the inode, first get the inode:

    ls -i Kinetix*.L5X
    

    That will return something like NNNNNNNN FILENAME where the Ns are the inode number. Now, pass that number to find:

    find . -inum [inode-number] -exec rm -i '{}' \;
    
share|improve this answer
1  
Werner Henze in the question comments mentioned trying the wildcard thing, that worked rm Kinetix* is what I tried with success, for clarification. Thanks! –  Fooxz Jul 10 '13 at 15:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.