readlink -f $(which command)
lsof -i :[port]
-
Make all swap off
sudo swapoff -a -
Resize the swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 -
Make swapfile usable
sudo mkswap /swapfile -
Make swapon again
sudo swapon /swapfile
:w !sudo tee %