免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: beijing3721
打印 上一主题 下一主题

如何在sparc和x86之间传递多个文件? [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-03-24 10:17 |只看该作者
原帖由 susbin 于 2008-3-19 00:51 发表
You might have two tar installed, the Solaris tar and the GNU tar.

Make suer you use the same tar command to create/extract.



root@t7100 # uname -a
SunOS t7100 5.10 Generic_127111-02 sun4u sparc SUNW,A70
root@t7100 # which cpio
/usr/bin/cpio
root@t7100 # which tar
/usr/sbin/tar
root@t7100 # cd /soft/License/
root@t7100 # ls -l
total 17283
-r--r--r--   1 root     root     8848543 Jun 12  2007 819-0764-10_SLA_Multi.pdf
root@t7100 # find . -print | cpio -ov > /test.cpio
.
819-0764-10_SLA_Multi.pdf
17296 blocks
root@t7100 # ls -l /test.cpio
-rw-r--r--   1 root     root     8855552 Mar 24 10:23 /test.cpio
root@t7100 # ftp 10.0.25.150
Connected to 10.0.25.150.
220 rac01 FTP server ready.
Name (10.0.25.150:root):
331 Password required for root.
Password:
230 User root logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/" is current directory.
ftp> bin
200 Type set to I.
ftp> put /test.cpio
200 PORT command successful.
150 Opening BINARY mode data connection for /test.cpio.
226 Transfer complete.
local: /test.cpio remote: /test.cpio
8855552 bytes sent in 11 seconds (790.40 Kbytes/s)
ftp> bye

root@t7100 # file /test.cpio
/test.cpio:     cpio archive - CHR (-c) header



-bash-3.00# uname -a
SunOS rac01 5.10 Generic_118855-33 i86pc i386 i86pc
-bash-3.00# which cpio
/usr/bin/cpio
-bash-3.00# which tar
/usr/sbin/tar
-bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
pcn1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.25.150 netmask ffff0000 broadcast 10.0.255.255
        ether 0:c:29:72:55:83
-bash-3.00# pwd
/
-bash-3.00# ls -l /test.cpio
-rw-r--r--   1 root     root     8855552 Mar 24 10:07 /test.cpio
-bash-3.00# mkdir /test
-bash-3.00# cd /test
-bash-3.00# cpio -idmv < /test.cpio
cpio: Not a cpio file, bad header.
1 errors

-bash-3.00#

-bash-3.00# file /test.cpio
/test.cpio:     byte-swapped cpio archive


[ 本帖最后由 beijing3721 于 2008-3-24 10:21 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP