I assume the problem is the debian link, which points to the same directory: $ ls -l tmp/debian lrwxrwxrwx 1 user user 1 Apr 22 20:47 tmp/debian -> . and creates a loop, I guess that's also why if I compress with: zip -r debian.zip tmpIt never ends but from the graphical environment it does compress well, because it will not pay attention to the recursive link.