Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While i was copying some files in /opt folder through WINSC, the /opt folder become file. Can you please inform how to make this again in folder?

share|improve this question
What is WINSC and what commands did you run to do this damage ? – Iain Nov 5 '12 at 15:15
Do you mean WinSCP? – kernelpanic Nov 5 '12 at 15:17

I suspect this isn't what you want but I can't think what your problem is as I've never heard of a directory becoming a file without it being deleted and recreated as a file anyway

mv /opt /optsafe
mkdir /opt 
share|improve this answer
How i will return back the files which were in /opt folder, as /opt is now become a file? I was trying to copy the patches in /opt folder through WINSCP ? – Imran Khan Nov 5 '12 at 15:17
@ImranKhan: after having searched your filesystem just in case it has been moved elesewhere I suspect you'll be reaching for your backups. – Iain Nov 5 '12 at 15:20

Your Answer


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.