Linux-Fu Part 1

I’ll do this from time to time when I come across some tidbits of information that I find useful to me.

  • pgrep and pkill – The first command will return the pid (process id) based on a name or other attribute.  pkill will signal a process with a patching name or attribute.  So if you want to kill processes being run by a user per say, you would execute a pkill -U USERNAME.
  • lsof – This command is usually pretty well known to most SysAdmins.  It allows us to see any files that are currently open on a particular filesystem.  It’s great for tracking down files that are locked open by processes or users, or finding files that have been deleted, but still alive for reasons I just mentioned.
  • iptraf – If you ever wanted to know where your traffic goes to and comes from, yum/apt-get install this sucker.  While you don’t get packet break down like you would from an app like WireShark, it’s still a pretty cool tool to track network traffic.
  • htop – This is like top on steroids.  Great tool that can be yum installed if you have rpmforge repos setup.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s