About TAR
对于RHEL5U10,默认的TAR是1.15的版本,该版本不是最新的TAR的版本。
并且,在不同的Linux平台上,TAR的程序实现也有所差别,比如,在BSD的环境中,tar的真实名称为:bsdtar,而在RHEL或者Fedora中,tar则为gnutar。
这种差异,有时候也许会带来一些意想不到的问题,所以需要详细的关注。
Shell log:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
[root@node1 ~]# cd /software [root@node1 software]# ll total 1872388 -rw-r--r-- 1 root root 1771182080 Aug 16 22:23 hadoop-2.5.0.tar -rw-r--r-- 1 root root 140376637 Aug 16 21:26 jdk-8u5-linux-x64.rpm -rw-r--r-- 1 root root 3877043 Aug 16 22:42 tar-latest.tar.gz [root@node1 software]# [root@node1 software]# whereis tar tar: /bin/tar /usr/include/tar.h /usr/share/man/man1/tar.1.gz [root@node1 software]# tar --version tar (GNU tar) 1.15.1 [root@node1 software]# [root@node1 software]# tar xzf tar-latest.tar.gz [root@node1 software]# ll total 1872392 -rw-r--r-- 1 root root 1771182080 Aug 16 22:23 hadoop-2.5.0.tar -rw-r--r-- 1 root root 140376637 Aug 16 21:26 jdk-8u5-linux-x64.rpm drwxr-xr-x 12 1000 1000 4096 Jul 27 13:45 tar-1.28 -rw-r--r-- 1 root root 3877043 Aug 16 22:42 tar-latest.tar.gz [root@node1 software]# cd tar-1.28/ [root@node1 tar-1.28]# ls ABOUT-NLS aclocal.m4 build-aux ChangeLog.1 configure COPYING gnu lib Makefile.am Make.rules po rmt src THANKS acinclude.m4 AUTHORS ChangeLog config.h.in configure.ac doc INSTALL m4 Makefile.in NEWS README scripts tests TODO [root@node1 tar-1.28]# export FORCE_UNSAFE_CONFIGURE=1 [root@node1 tar-1.28]# env | grep FORCE FORCE_UNSAFE_CONFIGURE=1 [root@node1 tar-1.28]# [root@node1 ~]# mkdir /tar [root@node1 ~]# [root@node1 tar-1.28]# ./configure prefix=/tar ... ... checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking for iconv_t... yes checking for a sed that does not truncate output... /bin/sed checking whether NLS is requested... yes checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating tests/Makefile config.status: creating tests/atlocal config.status: creating Makefile config.status: creating doc/Makefile config.status: creating gnu/Makefile config.status: creating lib/Makefile config.status: creating po/Makefile.in config.status: creating scripts/Makefile config.status: creating rmt/Makefile config.status: creating src/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: executing tests/atconfig commands [root@node1 tar-1.28]# [root@node1 tar-1.28]# make ... ... CC xattrs.o CCLD tar make[2]: Leaving directory `/software/tar-1.28/src' Making all in scripts make[2]: Entering directory `/software/tar-1.28/scripts' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/software/tar-1.28/scripts' Making all in po make[2]: Entering directory `/software/tar-1.28/po' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/software/tar-1.28/po' Making all in tests make[2]: Entering directory `/software/tar-1.28/tests' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/software/tar-1.28/tests' make[2]: Entering directory `/software/tar-1.28' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/software/tar-1.28' make[1]: Leaving directory `/software/tar-1.28' [root@node1 tar-1.28]# [root@node1 ~]# ls /tar [root@node1 ~]# [root@node1 tar-1.28]# make install ... ... installing zh_CN.gmo as /usr/local/share/locale/zh_CN/LC_MESSAGES/tar.mo installing zh_TW.gmo as /usr/local/share/locale/zh_TW/LC_MESSAGES/tar.mo if test "tar" = "gettext-tools"; then \ /bin/mkdir -p /usr/local/share/gettext/po; \ for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot Makevars.template; do \ /usr/bin/install -c -m 644 ./$file \ /usr/local/share/gettext/po/$file; \ done; \ for file in Makevars; do \ rm -f /usr/local/share/gettext/po/$file; \ done; \ else \ : ; \ fi make[1]: Leaving directory `/software/tar-1.28/po' Making install in tests make[1]: Entering directory `/software/tar-1.28/tests' make[2]: Entering directory `/software/tar-1.28/tests' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/software/tar-1.28/tests' make[1]: Leaving directory `/software/tar-1.28/tests' make[1]: Entering directory `/software/tar-1.28' make[2]: Entering directory `/software/tar-1.28' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/software/tar-1.28' make[1]: Leaving directory `/software/tar-1.28' [root@node1 tar-1.28]# [root@node1 ~]# tar --version tar (GNU tar) 1.15.1 [root@node1 ~]# [root@node1 ~]# ls /tar bin libexec share [root@node1 ~]# /tar/bin/tar --version tar (GNU tar) 1.28 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. [root@node1 ~]# |
————————————————————————————————————
Ending。