Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Thanks

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
add comment

2 Answers

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
add comment

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

share|improve this answer
add comment

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.