Sunday, February 6, 2011

Just some useful stuff: bash networking commands


After all that clicking and scrolling for my last post, I ended up finding several other useful commands. Most of them are to do with networking and I'd just like to have them handy. Here goes.

Display total space and availability:
df -h

Display size of a folder, a couple of options here, may need to be sudo:
sudo du -hs /path/to/folder
sudo du -chks /path/to/folder

IP Scanning with range 192.168.1.1-192.168.1.254:
sudo nmap -sP 192.168.1.1-254

Scan operating system on target IP (cool!):
sudo nmap -O 192.168.1.3


...and that was all!

No comments:

Post a Comment