Hadoop源码一撇 规格严格

今天看到个Hadoop的异常,在FileUtil里面,看了看里面代码,果真很多,和Common-io有一拼,其中这个挺有意思,首先我贴出来命令解释网址:

关于Tar的 http://www.sadtojoy.com/article/2012/4/25/4122.htm

其次代码:

        if (gzipped) {
            untarCommand.append(" gzip -dc '");
            untarCommand.append(FileUtil.makeShellPath(inFile));
            untarCommand.append("' | (");
        }
        untarCommand.append("cd '");
        untarCommand.append(FileUtil.makeShellPath(untarDir));
        untarCommand.append("' ; ");
        untarCommand.append("tar -xf ");

        if (gzipped) {
            untarCommand.append(" -)");
        } else {
            untarCommand.append(FileUtil.makeShellPath(inFile));
        }

那么全部就是,举个例子 gzip -dc XX.tar.gz | (cd Dir; tar -xf -)

Too many files

http://hi.baidu.com/bluesnake/blog/item/d267e350019a85591138c2f2.html

http://dennis-zane.iteye.com/blog/321371

 
原文地址:https://www.cnblogs.com/diyunpeng/p/2545511.html