- Read which processes are writing to the hard drive
# echo 1 | sudo tee /proc/sys/vm/block_dump
wait few seconds
# echo 0 | sudo tee /proc/sys/vm/block_dump
# dmesg | grep WRITE
- Detect service and server versions using nmap:
# nmap -A -T4 -F 192.168.1.1
- Print the detailed statistics of transferred bytes by the firewall rules
# sudo iptables -L -nv
- Convert the bit rate of an MP3
# lame -b 128 input.mp3 output.mp3 - Setup wireless network from command line:
# sudo iwconfig wlan0 essid MY_AP_ESSID
# sudo iwconfig wlan0 key "12371272BCBCBABC1212"
# sudo dhclient wlan0
where wlan0 is the ID of network device. - Which process is accessing the CDROM
# lsof -n | grep /media/cdrom - Convert DOS end of line to UNIX end of line
# sed -e 's/\r$//' inputfile > outputfile
or
# tr '\r' '\n' < inputfile > outputfile
- Get the size of a directory
# du -sh /home/blabla - Change MAC address of a network interface
# sudo ifconfig wlan0 hw ether AA:AA:BB:BB:CC:DD - Change your password in a non-interactive shell (PHP, Python web shells). Edit and paste these lines in to your shell:
passwd <<+++
oldpasswd
newpasswd
newpasswd
+++
Saturday, May 10, 2008
Not so frequent command line hacks
o 8:25 AM
Subscribe to:
Post Comments (Atom)
0 komentárov:
Post a Comment