Useful Ubuntu Commands
Some Useful Commands in Ubuntu
- Using wget in recursive mode
sudo wget -r --no-parent --reject "index.html" <link>
- Write in vim when you have forgotten sudo (YES this is possible!!!). The bane of every sysadmin :-P
:w !sudo tee%
- Show hard-drive information
sudo hdparm -I <drive-location>
- Drop your cache. Useful when you want to test a cold cache
echo 3 > /proc/sys/vm/drop_caches
- Kill all processes running on a particular port.
sudo fuser -k <port>/tcp
- Change the sudo file if it has error
pkexec visudo