每次用tar 命令都会犯些白痴错误,以后遇到一些就记录一些,看你长不长记性。
1.将文件解压至指定目录时,文件所在目录与目标目录之间不要忘了加参数C(-C,注意大写);
2.今天安装hadoop解压时冒出一大片错误如下:
tar: hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/collapsed.gif: Cannot open: No such file or directory
hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/logo_maven.jpg
tar: hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/logo_maven.jpg: Cannot open: No such file or directory
hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/logo_apache.jpg
tar: hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/logo_apache.jpg: Cannot open: No such file or directory
hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/icon_success_sml.gif
tar: hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/icon_success_sml.gif: Cannot open: No such file or directory
hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/apache-maven-project-2.png
tar: hadoop-2.4.0/share/doc/hadoop/hadoop-streaming/images/apache-maven-project-2.png: Cannot open: No such file or directory
tar: Exiting with failure status due to previous errors
……………………
吓了我一跳,后来用切换至root执行,OK啦~
嗯,以后要多写博客。