Linux commands

[1] lsof -i :<port_number> : To find out who is listening to the specified port

jestinjoy@jestin:~$ lsof -i :80

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

firefox-b 3463 jestinjoy 21u IPv4 22204 TCP 192.168.1.3:57779->maa03s01-in-f104.1e100.net:www (ESTABLISHED)

firefox-b 3463 jestinjoy 65u IPv4 22191 TCP 192.168.1.3:60551->maa03s01-in-f100.1e100.net:www (ESTABLISHED)

firefox-b 3463 jestinjoy 66u IPv4 22246 TCP 192.168.1.3:58349->nuq04s01-in-f113.1e100.net:www (ESTABLISHED)

firefox-b 3463 jestinjoy 77u IPv4 22713 TCP 192.168.1.3:48887->maa03s01-in-f95.1e100.net:www (ESTABLISHED)

[2] finger @kernel.org : Gives information about current kernel

jestinjoy@jestin:~$ finger @kernel.org

[kernel.org]

The latest linux-next version of the Linux kernel is: next-20110506

The latest snapshot 2.6 version of the Linux kernel is: 2.6.39-rc6-git6

The latest mainline 2.6 version of the Linux kernel is: 2.6.39-rc6

The latest stable 2.6.38 version of the Linux kernel is: 2.6.38.5

The latest stable 2.6.37 version of the Linux kernel is: 2.6.37.6

The latest stable 2.6.36 version of the Linux kernel is: 2.6.36.4

The latest longterm 2.6.35 version of the Linux kernel is: 2.6.35.13

The latest stable 2.6.35 version of the Linux kernel is: 2.6.35.9

The latest longterm 2.6.34 version of the Linux kernel is: 2.6.34.9

The latest longterm 2.6.33 version of the Linux kernel is: 2.6.33.12

The latest longterm 2.6.32 version of the Linux kernel is: 2.6.32.39

The latest stable 2.6.32 version of the Linux kernel is: 2.6.32.28

The latest longterm 2.6.27 version of the Linux kernel is: 2.6.27.59

The latest stable 2.6.27 version of the Linux kernel is: 2.6.27.57

The latest stable 2.4.37 version of the Linux kernel is: 2.4.37.11

[3] date -s "21 JUL 2011 19:13:00" : Set date and time from command line

# date -s "21 JUL 2011 19:13:00"

Thu Jul 21 19:13:00 IST 2011

[4] getconf PAGESIZE : Gives the page size value

# getconf PAGESIZE

4096