Compress all the pdf in a folder with a bash script
This script is writing in bash but you can use WSL for running the code with Windows.
- Install ghostscript for ubuntu use
sudo apt update
sudo apt install ghostscript
- Create a folder and insert into that your folder with all your pdf (name a for example) and this script.
- Use cd for changing directory and set your main directory.
cd a
- Check if the name of the folder is the same that you set in the script.
- Set the permission of the file and the folder
chmod -R u=rwx a
- Run the script with
./pdf_compess.sh
- Read the output for the confirm.
gg!