我知道你可以用mkdir
来创建一个目录,用touch
来创建一个文件,但是没有办法一次完成这两个操作吗?
i、 e.如果我想在文件夹other
不存在时执行以下操作:
cp /my/long/path/here/thing.txt /my/other/path/here/cpedthing.txt
错误:
cp: cannot create regular file `/my/other/path/here/cpedthing.txt': No such file or directory
有人想出一个函数来解决这个问题吗?