When copying a file using cp to a folder that may/may not exist, how do I make sure to create the folder if necessary?
I tried this;
[root@file nutch-0.9]# cp -f urls-resume /nosuchdirectory/hi.txt cp: cannot create regular file `/nosuchdirectory/hi.txt': No such file or directory