UNIX Sysadmin Boot Camp: bash

Ryan RobsonWelcome back to UNIX Sysadmin Boot Camp. You’ve had a few days to get some “reps” in accessing your server via SSH, so it’s about time we add some weight to your exercise by teaching you some of the tools you will be using regularly to manage your server.

As we mentioned earlier in this series, customers with control panels like cPanel/WHM and Plesk might be tempted to rely solely on those graphical interfaces. They are much more user-friendly in terms of performing routine server administration tasks, but at some point, you’re going to need to get down and dirty on the command line. It’s inevitable. This is where you’ll use bash commands.

Here are some of the top 10 essential commands you should get to know and remember in bash. Click any of the commands to go to its official “manual” page.

  1. man – This command provides a manual of other bash commands. Want more info on a command? Type man commandname, and you’ll get more information about “commandname” than you probably wanted to know. It’s extremely useful if you need a quick reference for a command, and it’s often much more detailed and readable than a simple --help or --h extension.
  2. ls – This command lets you list results. I showed you an example of this above, but the amount of options that are available to you with this command are worth looking into. Using the “manual” command above, run man ls and check out the possibilities. For example, if you’re in /etc, running ls –l /etc will get you a slightly more detailed list. My most commonly used list command is ls –hal. Pop quiz for you (where you can test your man skills): What does the -hal mean?
  3. cd – This command lets you change directories. Want to go to /etc/? cd /etc/ will take you there. Want to jump back a directory? cd .. does the trick.
  4. mv – This command enables you to move files and folders. The syntax is mv originalpath/to/file newpath/to/file. Simple! There are more options that you can check out with the man command.
  5. rm – This command enables you to remove a file or directory. In the same vein as the mv command, this is one of those basic commands that you just have to know. By running rm filename, you remove the “filename” file.
  6. cp – This command enables you to copy files from one place to another. Want to make a backup of a file before editing it? Run cp origfile.bla origfile.bak, and you have a backup in case your edit of origfile.bla goes horrendously wrong and makes babies cry. The syntax is simply: cp /source /destination. As with the above commands, check out the manual by running man cp for more options.
  7. tar – On its own, tar is a command to group a bunch of files together, uncompressed. These files can then be compressed into .gzip format. The command can be used for creating or extracting, so it may be a good idea to familiarize yourself with the parameters, as you may find yourself using it quite often. For a GUI equivalent, think 7-zip or WinRAR for Windows.
  8. wget – I love the simplicity of this little command. It enables you to “get” or download a target file. Yes, there are options, but all you need is a direct link to a file, and you just pull one of these: wget urlhere. Bam! That file starts downloading. Doesn’t matter what kind of file it is, it’s downloaded.
  9. top – This handy little binary will give you a live view of memory and CPU usage currently affecting your machine, and is useful for finding out where you need to optimize. It can also help you pinpoint what processes may be causing a slowdown or a load issue.
  10. chmod – This little sucker is vital to make your server both secure and usable, particularly when you’re going to be serving for the public like you would with a web server. If you read about how I learned to stop worrying and love the bomb, er permissions, you should be familiar with this command and its connotations. Combine good usage of permission and iptables, and you have a locked down server

When you understand how to use these tools, you can start to monitor and track what’s actually happening on your server. The more you know about your server, the more effective and efficient you can make it. In our next installment, we’ll touch on some of the most common server logs and what you can do with the information they provide.

Did I miss any of your “essential” bash commands in my top 10 list? Leave a comment below with your favorites along with a quick explanation of what they do.

-Ryan

StumbleUpon
Twitter
DZone
Digg
del.icio.us
Technorati

Critics Slam Lost Finale – Do You Agree? – Us Magazine


CBC.ca
Critics Slam Lost Finale - Do You Agree?
Us Magazine
... redeemed itself by going back to what made it so captivating in the first place: life or death drama, nail-biting tension and spiritual enlightenment. ...
Lost: paradise tossedEye Weekly
Once 'Lost,' now apparently foundPhiladelphia Inquirer
Lost Finale Recap: And So It GoesNew York Magazine
MediaBlvd Magazine -The AtlanticWire (blog) -Gather.com
all 1,915 news articles »

Supply-sider Republican emerges in Oregon Governors race

Former Star with the NBA

From Eric Dondero:

What is it about former athletes turned Republican politicians that they tend towards the Reaganesque supply-sider side of the free market economics spectrum?

Meet Chris Dudley. Talk about a political race that has been completely under the radar of the national news media. He's a former NBA star, which you would think would warrant him some major attention. And he just won the Republican nomination for Governor. But outside of Oregon, there's been little attention given to this race. Perhaps his party affiliation as an 'R' has caused the media to shy away?

Dudley was diagnosed with Type 1 diabetes at an early age. Despite his handicap he went on to star for Yale, and later played 16 seasons in the NBA, 6 for the Portland Trailblazers. He and his wife Chris (her actual name), and their three children live in Lake Oswego.

The very latest poll has him ahead of his Democrat opponent John Kizhaber by a hair. From Rasmussen via Hedgehog:

OREGON – GOVERNOR (Rasmussen)
Chris Dudley (R) 45%
John Kitzhaber (D) 44%

Taking after another famous Sports Legend & Supply Sider

The Dudley campaign is running on Jobs First! with a special emphasis on private sector employment.

From his campaign website:

As Governor, Chris Dudley will make Oregon’s tax system more attractive for existing businesses, new businesses, entrepreneurs and people with investment income; will reduce the highest-in-the-nation state capital gains tax rate; will increase tax deductions for businesses making new capital investments (bonus depreciation); and will work to reduce Oregon’s highest-in-the-nation taxes that unfairly tax too many small, unprofitable and start-up businesses.

Now the Dudley campaign has released further details on his job creation plan. And it hails from a decidedly Jack Kemp-ian direction.

From the Statesman-Journal:

The massive shortfall in revenue is the direct result of a lack of leadership and common sense in Salem. Neglecting private-sector job growth of course will result in a decline in personal incomes and tax revenue.

The solution, however, for long-term budget shortfalls is within our grasp. We need to lower the cost of government. I have proposed doing this by ending automatic budget increases, reducing state employee health-care premiums and curbing PERS costs. And on the revenue side we can increase tax collections not by raising taxes, but by creating new taxpayers.

Reviving our economy is the only long-term way to balance our state budget without raising taxes.

Expanding the taxpayer base instead of raising taxes. What a concept?

Sestak Scandal has some Sea Legs

"High Crime and Misdemeanor"

Former Navy Admiral and recently nominated Democrat Senate candidate for Pennsylvania Joe Sestak is in increasingly hot water. The speculation from all sides is he was indeed offered the position of Admiral of the High Seas (Navy Secretary) in exchange for him dropping out of the Senate race, thus allowing Arlen Specter to sail through the primary.

Humble Libertarian and LR Webmaster Wes Messamore asks - Did Barack Obama Commit A Felony?:

Could this be the beginning of the end of the Obama Administration? Have his corrupt, Chicago-style politics finally caught up with him?

Discussing the issue with Sean Hannity, former White House adviser to President Bill Clinton, Dick Morris said:

"This scandal could be enormous. It's Valerie Plame only 10 times bigger, because it's illegal and Joe Sestak is either lying or the White House committed a crime. Obviously, the offer of a significant job in the White House could not be made unless it was by Rahm Emanuel or cleared with Rahm Emanuel... that is a high crime and misdemeanor."

Sestak is running against libertarian-leaning Republican and former Club for Growth President Pat Toomey.

Libertarian Party of Kentucky criticizes Rand Paul, says they may run a candidate against him

From Eric Dondero:

The Washington Post quoted Libertarian Party of Kentucky Vice-Chairman Joshua Koch yesterday in an article titled - "Libertarians may run Senate candidate in Ky." by reporter Roger Alford. The story was picked up by the AP. From WaPo:

FRANKFORT, Ky. -- The Libertarian Party is considering running a candidate in Kentucky's U.S. Senate race, saying GOP nominee Rand Paul - the son of a former Libertarian presidential candidate - has betrayed the party's values.

Party Vice Chairman Joshua Koch said Wednesday that Paul has been a black eye for Libertarians because of stands he's taken on issues, including his criticism of the 1964 Civil Rights Act.

Koch said Paul is not a Libertarian. He called Paul and his Democratic opponent, Kentucky Attorney General Jack Conway, "faces of the same bad coin."

The article continued:

Koch had strong criticism for Paul, who won the Republican Senate nomination last week by trouncing the GOP establishment candidate, Secretary of State Trey Grayson.

"He had gone from being an outsider candidate to a tea party candidate to an establishment candidate in the past nine months," Koch said. "It's a complete identity crisis. I've never seen anything like it."

Koch did not say who the Libertarian Party might put up to run in the race.

Reached for a comment by Libertarian Republican Koch wanted to be clear that his views were his and represented only the Libertarian Party of Kentucky:

"These are my comments and do not speak for the entire libertarian movement... my remarks and those released were from the LPKY. I do not speak for Libertarian Republicans."

The Washington Post did not make the distinction between Libertarian Party and the small 'l' libertarian movement in the piece.

Tea Party Libertarians, Libertarian Republicans and numerous independent libertarians are enthusiastically supportive of Paul. Paul was one of the first candidates endorsed in the 2010 electon cycle by the Republican Liberty Caucus, which represents the libertarian win of the GOP. Dave Nalle, National Chairman of the RLC was not contacted by the Post for the interview, nor were any RLC members in Kentucky.

LPKY Chair Ken Moellman backs away from strong anti-Rand Paul stance

From Eric Dondero:

The leadership of the Libertarian Party of Kentucky is in turmoil over comments made by LPKY Vice-Chair Joshua Koch to the Washington Post on Tuesday. Koch said that Rand Paul was not going to be supported by Libertarians in the State, and that the Libertarian Party may in fact run a candidate against him.

In an interview with Libertarian Republican, LPKY Chairman Ken Moellman indicated that Vice-Chairman Joshua Koch may have been speaking out of turn, and was misrepresented by the Washington Post as speaking on behalf of the entire Libertarian Party.

Late last night, Moellman issued the following statement on the Party's official website, (excerpted):

It's now painfully obvious that we need to clarify some things. I've been on the phone all day, which has just been great (sarcasm). Let's get some things cleared up right now:

The LPKY is not endorsing anyone in the Senate race

As a party we have no one in this race, and we do not seek to help or harm the candidacy of any candidates other than our own. As a party, it would be completely inappropriate to involve ourselves or in any way devote resources to a candidate outside of the LPKY, when there are great libertarian candidates running as Libertarians for office in Kentucky.

Anything that looked like any sort of endorsement or un-endorsement should be seen as a private individual's opinion, and not the policy of the LPKY. .

The LPKY has no candidate for US Senate

While technically possible for the LPKY to run a US Senate candidate in 2010, the prospects are very unlikely, despite what some in the media have said...

Any other comments are individual opinions and are not the view of the Libertarian Party of Kentucky. (emphasis Ken Moellman's)

Note - Other leaders in the libertarian political movement at the upper levels, have expressed privately to Libertarian Republican their great displeasure at the initial comments released by the LPKY.

Illinois Libertarian for Governor Lex Green – Legalize Casinos to Balance Budget

From Eric Dondero:

Lex Green is the Libertarian Party nominee for Governor of Illinois. The Party recently went over the required amount of signatures for ballot access for 2010.

Green comes from the mainstream wing of the Libertarian Party. His emphasis is solidly on the economics side. He's been crunching the numbers on the Illinois budget and has come up with an 8-point plan.

It includes:

1. No Growth Budgeting.
2. Pension Reform.
3. Reduce added costs associated with Bond debt.
4. Both Broad and Specific Budget Cuts.
5. Deep cuts in Agencies and Grants.
6. Reduce Medicaid fraud and look to sunset Illinois participation.
7. Use Zero based budget justification.

All sensible, almost Republican style proposals. But it is with #8 that his libertarian streak breaks through:

8. Issue Additional Casino Licenses. There is no reason to limit casino licenses, except to respect the wishes of individual counties. While we re-prioritize our budgets, we can continue to collect revenue from casinos. But we have no reason to be in the Lottery business. I propose to sell the lottery to the highest bidder.

Note - Green's wife Karen is a local Republican Precinct Committeewoman.

See the entire detailed budget proposal at electLex.com

Former Sanford aide Will Folks, making charges against Nikki Halley, is a libertarian Republican

Alleged Sex Scandal erupts among two libertarian Republicans

From Eric Dondero:

This is a painful blog post to make. About as painful as when we reported here a year ago, on Wisconsin State Rep. Jeff Woods a former Libertarian Party member, turned Republican, getting busted on his second DUI charge, or when we had to first report definitively on Mark Sanford's affair with an Argentine woman. But report on this we must.

As many are aware reading the political news sites these past couple days, there's been allegations of infidelity made against Nikki Halley, now frontrunner for South Carolina governor. The allegations are being shot down rather quickly. Halley has of course, unequivocally denied everything.

Halley has long been considered a libertarian Republican. And she is clearly identified with what's called the "Mark Sanford libertarian wing of the SC GOP."

Now we learn that the allegations have been made by another libertarian Republican.

From the Sun-News:

Haley "categorically and totally" denied the allegation by Will Folks, a controversial former spokesman for Gov. Mark Sanford. Folks now blogs and has done paid public relations work for politicians -- including Haley

Former rock band member's blog "sometimes accurate; sometimes not"

Folks has an "edgie" punk rock persona. He leads what's been called a "moderately successful" alternative rock band called Dead Agent Caper. More:

Folks is a controversial figure in S.C. politics. He first came to notice after Mark Sanford tapped the former rock band bass player as his spokesman. In 2005, however, Folks pleaded guilty to criminal domestic violence. Since then, he has built FITSnews.com into an influential blog among South Carolina politicos, particularly libertarian-Republicans, including the Sanford-Haley wing of the GOP.

The site frequently taps anonymous sources to publish otherwise unverifiable rumors, sometimes accurately and sometimes not. Much of the rest of the site covers sports or the latest celebrity photos cribbed from entertainment blogs. Folks shrugs off accusations that he is paid to publish certain stories on his blog.

There's been internet rumors that he's on somebody's payroll. I wouldn't be at all surprised.

Ironically, this could all end up benefiting Halley, by giving her a huge groundswell of sympathy vote. Notably, both Mitt Romney and Sarah Palin are standing by her side, and have backed her up on this 100%.

In one way, it might even be a welcome sign for libertarian Republicans: A sign that we've grown so large and influential that we now have our own fiery internal battles and even (non)sex scandals.

UPDATE!

Our friend Stacy McCain at TheOtherMcCain has uncovered some rather creepy details of Will Folk's past relationships or more accurately non-relationships with Republican female campaign staffers. Article: "OMG: Did You See What Haley Accuser Will Folks Wrote About Ashley Herzog?"

Redlich acknowledged with Major Party candidates

Warren Redlich is the Libertarian Party nominee for Governor of New York. He was elected as a Republican in 2006 to the Guiderland town council (upstate). He is also seeking the Republican nomination for Governor.

From The Business Review - Albany:

Cuomo is the only Democrat to announce his candidacy so far. Republicans have four candidates: Lazio, who is currently a lobbyist for J.P. Morgan Chase; Steve Levy, the Suffolk County executive; Carl Paladino, a multimillionaire developer from Buffalo; and Warren Redlich, an attorney in Guilderland. He has already received the Libertarian Party’s nomination.

If Cuomo faced Paladino or Levy on Election Day, Cuomo defeats either one by the same margin, 65 percent to 22 percent, according to the poll...

Though, Redlich unlike the three others, was not included in the polling numbers.

Episode 38 Indian Nuclear Medicine With Dr Malhotra and Dr Krishna

Episode 38 Indian Nuclear Medicine With Dr Malhotra and Dr Krishna
This podcast features interviews with Dr Malhotra and Dr Krishna
discussing Nuclear Medicine and Nuclear Medicine Education in India and how the world may benefit from it.

Direct link to itunes ??
Direct link to itunes, download itunes, install, then click this link to subscribe to podcast

Also I have updated our links and you can get the podcast page at both http://nuccast.com
And http://www.nuccast.com with the feed to put into iTunes or juice or your favorite podcast software can be found at http://molcast.com or http://www.molcast.com. The cardiac subset of the podcast can be found at http://cardiac.nuccast.com and the feed at http://cardiac.molcast.com.

Please pass on information about this podcast to your colleagues and to your CPD provider.
Remember you can get the podcast but going to itunes and entering the search term nuclear medicine best the way to subscribe is via this link

Or you can subscribe by entering your email address below and you will be informed of new episodes

Enter your email address:

Delivered by FeedBurner

The easiest way to remember to tell your colleagues about the podcast is via the web link at nuccast.com or molcast.com

Most importantly of all please help this podcast by contributing your opinions, Sound files, emails or phone calls details below:

You click on the little bird icon below and it will allow you to send me a voice mail from your computer.
If you don’t have a microphone then you can
1. Call toll-free anytime 24/7 in the USA at 1-888-65-GCAST (888-654-2278). If outside USA: +1-305-437-8719.
2. Enter the phone number 207-099-2527
then enter the PIN 1401
3. Record your message, don’t worry it wont go straight into the podcast unless you ask me too.
Please leave your name and email address in your message so I can get back to you.
You can email me at rob@nuccast.com
Or
nucmedpodcast@gmail.com
Send Me A Message
All contributions welcome, especially as sound files to nucmedpodcast@gmail.com.
Link link to mp3 file