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

I have got a sftp script that downloads the archives , unzip it and then rename the files according to date and moves it to respective folder.

I had to move the script from USB drive onto a separate server . After i moved whenever the script runs it extracts the files but while moving files it gives following error :

mkdir: cannot create directory `../abc/2011-11-23': No such file or directory

Any help will be appreciated.


share|improve this question
Is the 'directory' you are currently in happen to be a symlink to somewhere else? – Zoredache Dec 2 '11 at 5:35

It looks like the abc folder doesn't exist. You probably want to use -p option to make parent directories as needed:

$ mkdir -p ../abc/2011-11-23
share|improve this answer
thats what confusing me as /abc folder is already there, but i am still going try this – San Dec 2 '11 at 5:19

Either there is no '../' or there is no '../abc/'

share|improve this answer

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.