I can't manage to figure out the
-x option in the command zip.
I want to compress a working folder to save it as a backup, but I have some files and a directory that contains huge files that I don't need to save.
Therefore I would like to compress the whole directory except for the one listed above.
Here is my script:
#!/bin/bash clear echo "Saving all work directory in the backup" now=$(date +'%Y_%m_%d') filename=($(echo "backup_"$now)) cd /local00/home/F48174/Documents/scripts_eprou_aster/ echo "... removing /base because it's huge ..." zip -9 -r /local00/home/F48174/Documents/backup/$filename.zip -x /local00/home/F48174/Documents/scripts_eprou_aster/base/
Sorry for the really poor code quality, I'm only beginning to learn shell scripting.