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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -