whewebsite.blogg.se

Bash zip folder
Bash zip folder













bash zip folder

We should not see any message if we use this switch. There you go, size of file is 44M which is 24% of original size. rw-rw-r- 1 root root 44M Nov 29 02:02 credits.zip Lets check the size of file now ls -lh credits.zip zip credits credits.csvĭeflated 76% means, file has been compressed by 76%. Lets compress it using zip and see what we get. rw-rw-r- 1 root root 182M Sep 21 10:29 credits.csvĪs we see above the size of file is 182M. Lets compress a file first and see how it works ls -lh credits.csv We will start with the basics of zipping files and directories and touch upon few of these switches which one should know. There are lot of options that come with zip. e encrypt -n don't compress these suffixes y store symbolic links as the link instead of the referenced file T test zipfile integrity -X eXclude eXtra file attributes A adjust self-extracting exe -J junk zipfile prefix (unzipsfx) F fix zipfile (-FF try harder) -D do not add directory entries x exclude the following names -i include only the following names

bash zip folder bash zip folder

read names from stdin -o make zipfile as old as latest entry c add one-line comments -z add zipfile comment q quiet operation -v verbose operation/print version info 0 store only -l convert LF to CR LF (-ll CR LF to LF) r recurse into directories -j junk (don 't record) directory names d delete entries in zipfile -m move into zipfile ( delete OS files) f freshen: only changed files -u update: only changed or new files If zipfile and list are omitted, zip compresses stdin to stdout. The default action is to add or replace zipfile entries from list, whichĬan include the special name - to compress standard input. Lets check what are the options available for zip command zip -helpĬopyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license. If it is not installed then, it will be installed. Package 86_64 already installed and latest version In Linux it is very easy to use zip utility. Zip is very useful utility to compress data to How to Zip Files and Directories in Linux















Bash zip folder