【Linux】如何复制前 N 个文件夹到另一个文件夹下

我使用了网上查到的 ls |head -n 30 |xargs -i cp -r {} /mnt/raid7/Dachuang/Achuan/data/train_data

结果报错


cp: cannot stat ''$'\033''[0m'$'\033''[01;34m.'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34m..'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027889'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027890'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027891'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027892'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027893'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027894'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027895'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027896'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027897'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027898'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027899'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027900'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027901'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027902'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027903'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027904'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027905'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027906'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027907'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027908'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027909'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027910'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027911'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027912'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027913'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027914'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027915'$'\033''[0m': No such file or directory
cp: cannot stat ''$'\033''[01;34mERR2027916'$'\033''[0m': No such file or directory

  • Linux

    Linux 是一套免费使用和自由传播的类 Unix 操作系统,是一个基于 POSIX 和 Unix 的多用户、多任务、支持多线程和多 CPU 的操作系统。它能运行主要的 Unix 工具软件、应用程序和网络协议,并支持 32 位和 64 位硬件。Linux 继承了 Unix 以网络为核心的设计思想,是一个性能稳定的多用户网络操作系统。

    842 引用 • 907 回帖 • 235 关注
  • Q&A

    提问之前请先看《提问的智慧》,好的问题比好的答案更有价值。

    3063 引用 • 15909 回帖 • 493 关注

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • Achuan-2
    订阅者 作者

    额,原来是有人干了坏事

    image.png