Squid provides the -z
command line option to create the swap directories. Let's see an example:
squid -z
If this option is used and the cache directories don't exist already, the output will look similar to the following:
2010/07/20 21:48:35| Creating Swap Directories 2010/07/20 21:48:35| Making directories in /squid_cache/00 2010/07/20 21:48:35| Making directories in /squid_cache/01 2010/07/20 21:48:35| Making directories in /squid_cache/02 2010/07/20 21:48:35| Making directories in /squid_cache/03 ...
We should use this option whenever we add new cache directories in the Squid configuration file.
When the squid
command is run with the option -z
, Squid reads all the cache directories from the configuration file and checks if they already exist. It will then create the directory structure for all the cache directories that don't exist.