cp: cannot create symbolic link `/mnt/hgfs/SharedData/*/system.dat

[root@localhost hugh]# cp -rf linux-2.6.39 /mnt/hgfs/SharedData/
cp: cannot create symbolic link `/mnt/hgfs/SharedData/linux-2.6.39/arch/microblaze/boot/dts/system.dts': Operation not supported

total 74408

drwxr-xr-x 23 root root     4096 May 18  2011 linux-2.6.39
-rwxr-xr-x  1 root root 76096559 Dec 18 02:02 linux-2.6.39.tar.bz2
-rw-r--r--  1 root root        0 Dec 10 08:12 tmp.txt

drwxr-xr-x 32 root root     4096 Dec 13 07:48 u-boot-2008.10
因为要copy的是linux-2.6.39目录,而它的权限有问题,应该
#chmod 777 linux-2.6.39然后再copy肯定就没有问题了

[root@localhost ~]# vmhgfs-fuse --help Usage: vmhgfs-fuse sharedir mountpoint [options] Examples: vmhgfs-fuse .host:/ /mnt/hgfs vmhgfs-fuse .host:/foo/bar /mnt/bar general options: -o opt,[opt...] mount options -h --help print help -V --version print version -e --enabled check if system is enabled for the HGFS FUSE client. Exits with: 0 - system is enabled for HGFS FUSE 1 - system OS version is not supported for HGFS FUSE 2 - system needs FUSE packages for HGFS FUSE FUSE options: -d -o debug enable debug output (implies -f) -f foreground operation -s disable multi-threaded operation -o allow_other allow access to other users -o allow_root allow access to root -o auto_unmount auto unmount on process termination -o nonempty allow mounts over non-empty file/dir -o default_permissions enable permission checking by kernel -o fsname=NAME set filesystem name -o subtype=NAME set filesystem type -o large_read issue large read requests (2.4 only) -o max_read=N set maximum size of read requests -o hard_remove immediate removal (don't hide files) -o use_ino let filesystem set inode numbers -o readdir_ino try to fill in d_ino in readdir -o direct_io use direct I/O -o kernel_cache cache files in kernel -o [no]auto_cache enable caching based on modification times (off) -o umask=M set file permissions (octal) -o uid=N set file owner -o gid=N set file group -o entry_timeout=T cache timeout for names (1.0s) -o negative_timeout=T cache timeout for deleted names (0.0s) -o attr_timeout=T cache timeout for attributes (1.0s) -o ac_attr_timeout=T auto cache timeout for attributes (attr_timeout) -o noforget never forget cached inodes -o remember=T remember cached inodes for T seconds (0s) -o nopath don't supply path if not necessary -o intr allow requests to be interrupted -o intr_signal=NUM signal to send on interrupt (10) -o modules=M1[:M2...] names of modules to push onto filesystem stack -o max_write=N set maximum size of write requests -o max_readahead=N set maximum readahead -o max_background=N set number of maximum background requests -o congestion_threshold=N set kernel's congestion threshold -o async_read perform reads asynchronously (default) -o sync_read perform reads synchronously -o atomic_o_trunc enable atomic open+truncate support -o big_writes enable larger than 4kB writes -o no_remote_lock disable remote file locking -o no_remote_flock disable remote file locking (BSD) -o no_remote_posix_lock disable remove file locking (POSIX) -o [no_]splice_write use splice to write to the fuse device -o [no_]splice_move move data while splicing to the fuse device -o [no_]splice_read use splice to read from the fuse device Module options: [iconv] -o from_code=CHARSET original encoding of file names (default: UTF-8) -o to_code=CHARSET new encoding of the file names (default: UTF-8) [subdir] -o subdir=DIR prepend this directory to all paths (mandatory) -o [no]rellinks transform absolute symlinks to relative 我打了一下命令,你说的symlinks是什么?
12-10
你遇到的错误信息是: ``` cp: cannot create symbolic link '/mnt/hgfs/share/mpp/PRJ008/src/media/include': Operation not supported ``` 这个错误表明:在复制过程中,`cp` 命令尝试复制一些**符号链接(symbolic link)**,但由于目标文件系统(`/mnt/hgfs/share/`,通常是 VMware 的共享文件夹)**不支持符号链接**,导致复制失败。 --- ### ✅ 原因分析 - `/mnt/hgfs` 是 VMware Tools 用于共享主机文件夹的挂载点。 - **hgfs 文件系统**(VMware 的共享机制)默认**不支持创建或复制符号链接**。 - 当你使用 `cp -r` 递归复制包含软链接的目录时,`cp` 会尝试在目标位置重建软链接,但失败。 --- ### ✅ 解决方案 #### ✅ 方法一:使用 `-L` 参数解引用符号链接(推荐) ```bash cp -rL ~/NVMP/sdk/soc/T32/mpp /mnt/hgfs/share/ ``` - `-L` 表示“解引用符号链接”,即把软链接指向的**真实文件内容**复制过去,而不是复制链接本身。 - 这样可以避免在目标文件系统上创建符号链接。 --- #### ✅ 方法二:排除符号链接 如果你不想复制符号链接指向的内容,也可以使用 `rsync` 命令并跳过符号链接: ```bash rsync -r --exclude='*.so' --exclude='*'~/NVMP/sdk/soc/T32/mpp /mnt/hgfs/share/ ``` 或者更简单地: ```bash rsync -r --copy-links ~/NVMP/sdk/soc/T32/mpp /mnt/hgfs/share/ ``` - `--copy-links` 表示复制符号链接的目标文件,而不是链接本身。 --- #### ✅ 方法三:临时挂载支持符号链接的共享方式 如果你有权限修改虚拟机设置,可以尝试使用 `sshfs``samba` 挂载共享目录,它们支持符号链接。 --- ### ✅ 其他建议 - 如果你只是想确认复制内容是否完整,可以先复制到本地路径,再移动到共享目录: ```bash cp -r ~/NVMP/sdk/soc/T32/mpp ~/mpp_copy/ mv ~/mpp_copy /mnt/hgfs/share/ ``` --- ### ✅ 查看符号链接的方法 ```bash find ~/NVMP/sdk/soc/T32/mpp -type l ``` 这个命令会列出所有软链接文件。 ---
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值