Is there a Linux command to zip the files and folders inside a parent directory without including the parent directory. From all the solutions that I tried, the parent directory also is getting zipped
Advertisement
Answer
Move into the folder, then zip :
cd my-folder zip -r ../my-archive.zip *
Dirty, but effective
Or, in a more fancy way, using tar
:
tar czf my-archive.tar.gz -C /path/to/my-foder/ ./