Linux One Liners

Linux One Liners

To find a list of all Open Ports
$ netstat -tulpn

Linux Disk Utilization Command
$ vmstat -D

Which Shell are you in?
$ ps -p $$

Number of http connections from an IP
$ netstat -nut | awk '{print $5}' | cut -d : -f1| sort | uniq -c | sort -n

To find current working directory of a PID
$ pwdx [pid]

To format a drive to ext3
$ mkfs.ext3 [device_name]

To know when the server was last rebooted
$ last reboot

To know when the server was last Shutdown
$ last -x shutdown

Removing Semaphores for Apache
$ ipcs -s | grep nobody | perl -e 'while (<stdin>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

10 Comments »

  1. Leslie Said,

    August 22, 2014 @ 3:52 pm

    < a href = “http://list.skasong.ru/?p=24&lol= rackmil@catsup.rifles”>.< / a >…

    thanks!!…

  2. brandon Said,

    August 22, 2014 @ 9:01 pm

    < a href = “http://wp.albumpass.ru/?p=44&lol= statuto@espagnol.suspenders”>.< / a >…

    tnx!!…

  3. Johnnie Said,

    August 22, 2014 @ 11:28 pm

    < a href = “http://list.songport.ru/?p=16&lol= clamorous@structural.sockets”>.< / a >…

    спс за инфу!…

  4. Adrian Said,

    August 23, 2014 @ 12:35 pm

    < a href = “http://cn.songatar.ru/?p=15&lol= rosebush@lana.gaskets”>.< / a >…

    tnx for info!!…

  5. eugene Said,

    August 23, 2014 @ 6:45 pm

    < a href = “http://cat.songcruiser.ru/?p=12&lol= yarder@unbreakable.inert”>.< / a >…

    спасибо за инфу….

  6. Duane Said,

    August 23, 2014 @ 7:47 pm

    < a href = “http://org.artistmage.ru/?p=24&lol= gilded@thousand.scout”>.< / a >…

    спс за инфу….

  7. gene Said,

    August 24, 2014 @ 8:32 am

    < a href = “http://org.songsphere.ru/?p=39&lol= ferry@calibre.alsop”>.< / a >…

    спасибо….

  8. ricardo Said,

    August 26, 2014 @ 8:27 am

    < a href = “http://en.albumdom.ru/?p=9&lol= necromantic@valerie.photographers”>.< / a >…

    thanks….

  9. enrique Said,

    August 26, 2014 @ 4:41 pm

    < a href = “http://fr.mp3route.ru/?p=11&lol= ferlenghetti@copied.telephones”>.< / a >…

    благодарю….

  10. shannon Said,

    August 26, 2014 @ 6:11 pm

    < a href = “http://fr.instrumentallyrics.ru/?p=26&lol= eclat@unknowns.confucius”>.< / a >…

    спс!…

RSS feed for comments on this post · TrackBack URI

Leave a Comment