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

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

SQL Server - MyCTE query based on 24 hour period (next day) -