Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was doing homework on a remote server, and I realized that I had my header and cpp files swapped. So, I wanted to change the names. I began by renaming my header file 'temp'.

Then, weird things started happening. First, header file, named "temp", disappeared. The old header, named someFile.cpp, became empty. Also, my brackets started showing up as weird lowercase å characters.

Is this an issue with VI? My machine? Is there is a way to correct the situation?

Edit:

My machine was running Mac OS X, the remote machine was running some other Unix or Linux variant. I think it was Red Hat or Debian.

I used mv to rename the file.

share|improve this question
    
What was the exact way you did the renaming? –  user7187 Feb 29 '12 at 20:36
    
What is the operating system in question? –  Chris Down Feb 29 '12 at 20:41
    
@Chris, Neal, see my edits. –  Moshe Feb 29 '12 at 21:42
    
What's HW? I can only think of hardware, which doesn't make sense in context. What filesystem are you working on (some remote filesystem presumably, given that you speak of working on remote files? Or some local filesystem that you happened to be accessing over an SSH connection?) –  Gilles Feb 29 '12 at 23:43
    
Homework is also hw. –  Moshe Feb 29 '12 at 23:46

1 Answer 1

POSIX does not define any reserved filenames as far as I am aware. Certainly I can't think of any systems that have temp as a reserved filename, even outside of POSIX. As for brackets, it's more likely that your encodings don't match between the client and server (or the encoding doesn't support the character that you are trying to use).

share|improve this answer
    
The brackets worked before the command. –  Moshe Feb 29 '12 at 21:42
    
@Moshe - Even if it was, I fail to see how it would cause such an issue. –  Chris Down Feb 29 '12 at 21:44
    
What else might have caused the problem? –  Moshe Feb 29 '12 at 21:46
1  
@Moshe - There's not enough information to provide any meaningful speculation. Again, it's the usual sort of thing to come out of misconfigured character encodings. –  Chris Down Feb 29 '12 at 21:55
    
Is there anyway to recover a deleted file? –  Moshe Feb 29 '12 at 22:41

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.