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 -

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

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -