I want to copy a file from an old directory to a new directory and ideally I would like that the 'mv' command itself could create the directory for me in one step...
That is to say that the directory would not exist until 'mv' has been called as in:
mv olddirectory/file.dat newdirectory/file.dat
so mv would create the directory 'newdirectory' in the above call....
I am not sure if this is possible however, that is to say I think it may be necessary that the directory 'newdirectory' already exists before I make the above call to mv, as when I make try the above call when 'newdirectory' doesn't exist I get the following error:
mv: cannot move `test1/4215/4215-001R.fit' to `test2/test.fit': No such file or directory
so to sum up, my question is:
is there some paramater for 'mv' that I can change so that it will create the new directory as well as copy the file and if not, are there other commands that might do this?