linux - How to create a zip file without the middle directory? -
i have directory structure:
20150626/b/cctype1/file1 20150626/b/cctype2/file2 20150626/b/cctype3/file3
in zip file want directory structure be:
20150626/cctype1/file1 20150626/cctype2/file2 20150626/cctype3/file3
skipping directory b, without creating new directory structure , copying/moving files explicitly there large number of files!
this trick using sym link should work , avoid copying/moving !
cd 20150626/ ln -s b 20150626 zip -r yourfile.zip 20150626/
(i not sure can use zip directly it)
Comments
Post a Comment