Mac 10.6 - 无法将 cp 和 mv 文件放入 ~/Library/Screen Savers/

Mac 10.6 - 无法将 cp 和 mv 文件放入 ~/Library/Screen Savers/

我试图使用终端将文件复制到 ~/Library/Screen Savers/,但每次尝试这样做时都会失败。

我的命令是:

cp -r Web.saver '~/Library/Screen Savers/Web.saver'

结果是:

cp: ~/Library/Screen Savers/Web.saver: No such file or directory
cp: Web.saver: unable to copy extended attributes to ~/Library/Screen Savers/Web.saver: No such file or directory
cp: ~/Library/Screen Savers/Web.saver/Contents: No such file or directory
cp: Web.saver/Contents: unable to copy extended attributes to ~/Library/Screen Savers/Web.saver/Contents: No such file or directory
cp: ~/Library/Screen Savers/Web.saver/Contents/MacOS: No such file or directory
cp: Web.saver/Contents/MacOS: unable to copy extended attributes to ~/Library/Screen

对于 Web.saver 文件中的每个文件,依此类推

如果我做

mv Web.saver '~/Library/Screen Savers/Web.saver'

然后是说:

mv: rename Web.saver to ~/Library/Screen Savers/Web.saver: No such file or directory

即使 ~/Library/Screen Savers/ 确实存在。

有人能告诉我怎样才能让它工作吗?

谢谢

答案1

波浪号在引号内不起作用(参见此主题

你可以写

cp -r Web.saver $HOME"/Library/Screen Savers/Web.saver"

或者

cp -r Web.saver ~/Library/Screen\ Savers/Web.saver

或者

cp -r Web.saver ~/"Library/Screen Savers/Web.saver"

相关内容