1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Compress/decompress Large directories?

Discussion in 'Off Topic' started by Dean, Mar 9, 2012.

  1. Dean

    Dean Well-Known Member

    Did some testing a while ago, and it seems the linux zip command will not unzip if the resulting compressed file size is 2GB or greater.

    Any suggestion how to compress/decompress large directories on a linux server?
  2. Fred Sherman

    Fred Sherman Well-Known Member

    What type of distribution, version of the kernel and filesystem type? It may be nothing more than a ulimit.
  3. Adam Howard

    Adam Howard Well-Known Member

    Tar is what you should be using for such large file or folder
  4. Fred Sherman

    Fred Sherman Well-Known Member

    It has nothing to do with gzip, zip, tar, cpio or any other command. Its a kernel parameter that isn't allowing files larger than 2GB. Try and FTP a file larger than 2GB. It won't work either.

    # ulimit -a

    Look for "file size"

    It should look something like this:

    [fasherman@localhost ~]$ ulimit -a
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 7833
    max locked memory (kbytes, -l) 64
    max memory size (kbytes, -m) unlimited
    open files (-n) 1024
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 10240
    cpu time (seconds, -t) unlimited
    max user processes (-u) 1024
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited

    unlimited is what you want to see.

    append the line:

    * hard fsize 0

    to /etc/security/limits.conf and reboot.
  5. Dean

    Dean Well-Known Member

    Bold line: yes that is what it says.

    However while I have root access on the server that I am using, it is not my server. So I am reluctant to make any changes to the limits.conf file. So I will use a work around that I discovered shortly after I started this thread.

    But.... now I have the answer, thanks Fred! (y)

Share This Page