0

How can I use cp src/* des/ for copying all files which are not directories and without receiving the warning cp: <my_dir> is a directory (not copied).?

Nisba
  • 173
  • @PimpJuiceIT I do not want to copy file recursively, just have the exact behaviour of cp src/* des/ but without the warning message – Nisba Feb 01 '18 at 18:27
  • 1
    Oh, then you just use cp src/* des/ 2>/dev/null and send the standard error to null rather than seeing it in the terminal. Read more about it here http://www.learnlinux.org.za/courses/build/shell-scripting/ch01s04.html in the *stderr* section. – Vomit IT - Chunky Mess Style Feb 01 '18 at 19:32

0 Answers0