Originally Posted by yaroto98 I should be able to just say in one command "zip this directory and everything underneath it, and nothing above it". That doesn't seem like it's asking too much does it? Well, there's no "should" or "shouldn't" about it, it's just the way it is. The manual for zip says, "... paths stored in zip archives are always relative." Zip actually is deliberately programmed that way. You could get the zip source code and modify it to add a new option to specify the starting directory. But that would be an awful lot of work! Do you have to use zip? Would tar + bzip2 do? If so, you can do it in one command with tar's --directory and --bzip2 options.
Always make regular backups of your data (and test them). Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.
Yea, unfortunately I do have to use zip, unless another program can use the same zip algorithm.
In that case, you're stuck with pushd, zip, popd.
View Tag Cloud
Ubuntu Forums Code of Conduct