linux下软链接文件的拷贝

Posted mcdull^0^

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下软链接文件的拷贝相关的知识,希望对你有一定的参考价值。

最近在编译libnl库准备拷贝到其他机器中使用的时候出现无法拷贝问题,原因是sd卡是fat32文件系统格式,这种文件系统不支持linux下的ln软链接文件,

void@void-ThinkPad-E450:~/libnl-3.4.0$ sudo cp /usr/local/arm/libnl3.4/lib /media/void/0000-006F/ -rf
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-cli-3.so’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-3.so.200’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-3.so’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-route-3.so.200’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-genl-3.so’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-nf-3.so.200’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-xfrm-3.so’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-genl-3.so.200’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-idiag-3.so.200’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-xfrm-3.so.200’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-nf-3.so’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-route-3.so’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-idiag-3.so’: Operation not permitted
cp: cannot create symbolic link ‘/media/void/0000-006F/lib/libnl-cli-3.so.200’: Operation not permitted

于是只好先将整个文件夹打包,拷贝到别的机器上后再次解压即可

void@void-ThinkPad-E450:/usr/local/arm/libnl3.4$ sudo tar -cjvf libnl.bz2 ./lib

void@void-ThinkPad-E450:/usr/local/arm/libnl3.4$ cp libnl.bz2 /media/void/0000-006F/
gcc-linaro.tar.bz2      lib/                    libnl-3.4.0.tar.gz      libnl-doc-3.4.0.tar.gz  trave/                  
void@void-ThinkPad-E450:/usr/local/arm/libnl3.4$ cp libnl.bz2 /media/void/0000-006F/ -v
‘libnl.bz2’ -> ‘/media/void/0000-006F/libnl.bz2’
void@void-ThinkPad-E450:/usr/local/arm/libnl3.4$ sync

void@void-ThinkPad-E450:/usr/local/arm/libnl3.4$ umount /media/void/0000-006F
void@void-ThinkPad-E450:/usr/local/arm/libnl3.4$

 

以上是关于linux下软链接文件的拷贝的主要内容,如果未能解决你的问题,请参考以下文章

Linux下软链接与硬链接的区别

[转帖]Linux 下软链接和硬链接的区别

Linux下软链接和硬链接的区别

liunx描述Linux下软链接和硬链接的区别

linux下软链接与硬链接的区别

linux下软连接与硬链接的区别