首页 > 解决方案 > mac terminal copy command excluding folders

问题描述

In mac catalina, I use this most basic command to copy all files (but not subfolders) of a src directory to dest directory.

cp ~/dirFrom/* ~/dirTo/

In mac catalina, this command works perfectly, but gives this annoying message that it doesn't copy subfolders (of course because -r argument is left out). This is extremely annoying because I have automator shortcut that pops up this message each time it's run... Question is, how do I get this this annoying message to disappear or to specify not to try to copy folders/directories?

superfluous/unnecessary Message that's popped up every time it runs:

The action "Run Shell Script" encountered an error: "cp: /dirFrom/subdir is a directory (not copied)

标签: macosterminal

解决方案



推荐阅读