I'm new to using Linux and I'm trying to get zip to compress some files. I'm trying to find more infomation on the option -i for including files but can't find anything much useful through Google. All documentation seems to be a copy and paste from another site.
I want it to compress the files with a specified name. For example I have:
myfile.doc
myfile.xls
myfile.pdf
I want it to only compress myfile.doc and myfile.xls.
I can only find an example for files named with a certain suffix, ie:
zip -r myarchive . -i \*.doc
But I want it the other way round so:
zip -r myarchive . -i \myfile.*
which doesn't work. I also want it to exclude files name *.pdf. I don't know the syntax well so don't know what to try.
I want it to compress the files with a specified name. For example I have:
myfile.doc
myfile.xls
myfile.pdf
I want it to only compress myfile.doc and myfile.xls.
I can only find an example for files named with a certain suffix, ie:
zip -r myarchive . -i \*.doc
But I want it the other way round so:
zip -r myarchive . -i \myfile.*
which doesn't work. I also want it to exclude files name *.pdf. I don't know the syntax well so don't know what to try.