You are not logged in.
Is there a way to print the current cache directory with the pacman command? I know what it is set to, but for the sake of creating a script, how would you output the current pacman cache directory?
Offline
/home/fukawi2 $ pacman -v
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
Targets : NoneAre you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Totally overlooked that in the manpage. My eyes were searching for something exclusive to printing the cache directory.
This does the trick...
pacman -v | grep Cache | awk '{print $3}'...and thank you fukawi2!
Offline
If you don't change the location of the pacman config file, a single awk line will do
awk '/Cache/ {print $3}' /etc/pacman.confOffline
awk '/Cache/ {print $3}' /etc/pacman.conf
That's cool, thx ![]()
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline