dpkg-query resource hogger suspend
can suspend and resume the availability of dpkg-query command on linux to allow uninterrupted work, and general computer usage.Leave a Comment
cat dpkg-query.txt
use dpkg-query.enable to enable dpkg-query as normal
use dpkg-query.disable to disable dpkg-query
use dpkg-query.restore to restore the original dpkg-query
cat dpkg-query.disable
#!/bin/bash
# Check if the backup of dpkg-query exists
if [ ! -f /usr/bin/dpkg-query.elf ]; then
# Create a backup of the original dpkg-query
mv /usr/bin/dpkg-query /usr/bin/dpkg-query.elf && ln -sf /usr/bin/true /usr/bin/dpkg-query
# Create a symbolic link to /usr/bin/true
fi
cat dpkg-query.enable
#!/bin/bash
# Check if the backup of dpkg-query exists
if [ ! -f /usr/bin/dpkg-query.elf ]; then
# Create a symbolic link to backup of the original dpkg-query
ln -sf /usr/bin/dpkg-query.elf /usr/bin/dpkg-query
fi
cat dpkg-query.restore
#!/bin/bash
# Check if the backup of dpkg-query exists
if [ ! -f /usr/bin/dpkg-query.elf ]; then
# Restore a backup of the original dpkg-query
mv /usr/bin/dpkg-query.elf /usr/bin/dpkg-query
fi