UpFront
UpFront
Tech Tip
If you often have multiple putty, terminal, ssh or screen sessions connected to various remote servers, one good way to organize them is to have a small script that places the name of the remote server in the title bar:
#!/usr/bin/perl -w
$name = $ARGV[0];
unless ($name) { $name = `/bin/hostname` }
print "\033]0;$name\007";
Save this, and make it executable. If, for example, you save it as name, you simply can run name to place the name of the current server in the title bar of your current session.
If you want to label the session with something besides the hostname of the server, just specify the label on the command line:
# name "Mail Server"
Tech Tip
Most Linux distros come packed with documentation in the /usr/share/doc directory, but rarely is there an easy way to get an overview of what's there. The following script creates a master index of all the index.html files in /usr/share/doc and outputs it as index.html in the user's home directory:
#!/bin/bash
input_dir=/usr/share/doc
output_file=~/index.html
cat >$output_file <<EOF
<html>
<head>
<title>$input_dir</title>
</head>
<body>
EOF
find $input_dir -iname 'index.html' | \
sed 's/[^ ]*/\<br\>\<a href="file:&"\>&\<\/a\>/' \
>> $output_file
cat >>$output_file <<EOF
</body>
</html>
EOF
Tech Tip
The script command is used to log an entire session. Type the command script at the command prompt, and script then copies everything you type and its response to the file typescript. Script starts a sub-shell; when you want to stop saving the session, end the sub-shell (normally with Ctrl-D or by typing exit).
A very useful feature of the script command is that it can output timing information to a separate file. The script and the timing information then can be used to replay the script.
The following example creates a script and timing data (timing data is always written to standard error):
$ script -t 2> timinginfo Script started, file is typescript $ ls Desktop test scripts redbooks $ pwd /home/jagadish $ hostname homepc $ exit exit Script done, file is typescript
The entire terminal session then can be replayed later (with exact timing) using the scriptreplay command:
$ scriptreplay timinginfo $ ls Desktop test scripts redbooks $ pwd /home/jagadish $ hostname homepc $ exit exit
Script is a useful tool for training and educational purposes.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- RSS Feeds
- Readers' Choice Awards
- The Secret Password Is...
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




59 min 49 sec ago
1 hour 2 min ago
1 hour 4 min ago
5 hours 29 min ago
7 hours 19 min ago
12 hours 33 min ago
15 hours 44 min ago
18 hours 12 sec ago
18 hours 28 min ago
19 hours 26 min ago