我知道你可以mkdir创建一个目录并touch创建一个文件,但是没有办法一次完成这两个操作吗?
即如果我想在文件夹other不存在时执行以下操作:
cp /my/long/path/here/thing.txt /my/other/path/here/cpedthing.txt
Run Code Online (Sandbox Code Playgroud)
错误:
cp: cannot create regular file `/my/other/path/here/cpedthing.txt': No such file or directory
Run Code Online (Sandbox Code Playgroud)
有没有人想出一个功能作为解决方法?