Saturday, December 16, 2006

Unix Wildcard Characters

Using Wildcard Characters

Sometimes you might want to use a command on several different files. To reduce the amount of typing you need to do, you can use wildcard characters to aid in matching filenames.

?
This character matches any one character.
*
This character matches any group of zero or more characters.
Say you have a directory which contains the following files: `file', `file2', `file3', `fun', `fun2', `mbox', and `readme'. Here are some examples of wildcard use with these files:

    % ls *


    file file2 file3 fun fun2 mbox readme


    % ls f*


    file file2 file3 fun fun2


    % ls file?


    file2 file3


    % ls ????


    file mbox


The first example shows ls being used with a `*'. As promised, the `*' matched all the files in the directory (all files in the directory have 0 or more characters!). In the second example, an `f' is followed by a `*'. This caused all the files beginning with an `f' to be listed. The third example shows a use of the `?' character. With `file?', only filenames that begin with the word `file' and have one extra character on the end will be matched. Finally, using four `?' characters in a row will match all filenames that are exactly four characters long.

Use wildcard characters with caution. They are often useful but can be very dangerous. When used with a command like rm, you can easily remove all the files in a directory (which is something you probably do not want to do).

Sometimes you might want to use a command on several different files. To reduce the amount of typing you need to do, you can use wildcard characters to aid in matching filenames.

?
This character matches any one character.
*
This character matches any group of zero or more characters.
Say you have a directory which contains the following files: `file', `file2', `file3', `fun', `fun2', `mbox', and `readme'. Here are some examples of wildcard use with these files:

    % ls *


    file file2 file3 fun fun2 mbox readme


    % ls f*


    file file2 file3 fun fun2


    % ls file?


    file2 file3


    % ls ????


    file mbox


The first example shows ls being used with a `*'. As promised, the `*' matched all the files in the directory (all files in the directory have 0 or more characters!). In the second example, an `f' is followed by a `*'. This caused all the files beginning with an `f' to be listed. The third example shows a use of the `?' character. With `file?', only filenames that begin with the word `file' and have one extra character on the end will be matched. Finally, using four `?' characters in a row will match all filenames that are exactly four characters long.

Use wildcard characters with caution. They are often useful but can be very dangerous. When used with a command like rm, you can easily remove all the files in a directory (which is something you probably do not want to do).

Unix File System Command Summary

File System Command Summary

Here's a small summary of the commands that are discussed in the following sections. These commands do a variety of file system tasks, many of which are essential to know in order to get by in the Unix environment.

pwd
(present working directory) Prints out the full pathname of the directory you are currently in.

cd directory
(change directory) Changes your current directory. If you don't specify a directory as an argument, cd will bring you back to your home directory.

ls directory ...
(list) Lists the contents of a directory or directories. If you don't specify a directory, ls will list the contents of the current directory. You may also supply filename(s) to ls in order to get more information about files.

mkdir directory ...
(make directory) Used to create a directory or directories.

rmdir directory ...
(remove directory) Used to remove an empty directory or directories (the directories to be removed must not contain any files).

cat file1 ...
(concatenate) Used to view a file or files continuously on your terminal. If you use cat to view a long file, you will have to use C-s to pause the screen and C-q to unpause it (otherwise the file will just zip on by). For files longer than a screen, it is recommended that you use either more or less to view the file.

more file

less file
These two programs will let you view your file a screenful at a time. They both offer special viewing options such as paging backwards through a file and pattern searching. less is the more sophisticated of the two and has features that aren't found in more.

rm file1 ...
(remove) Removes the given file or files.

mv file1 file2

mv file1 ... fileN directory
(move) Moves a file or directory. In the first form, file1 will be moved to (renamed as) file2. The second form will move a number of files into a directory which you specify as the last argument. Note that directory names can be used in place of the filenames in either of the forms, to move or rename directories.

cp file1 file2

cp file1 ... fileN directory
(copy) Copies files. In the first form, file1 will be copied to a file called file2. The second form will copy a number of files into a directory which you specify as the last argument on the command line.

chmod mode file1 ...
(change mode) Changes file permissions. The mode specifies how you wish to change the permissions for the listed file(s).

The Unix Command Line Format

The Unix Command Line Format

Generally, Unix commands are pretty cryptic and take some time to master. Yet, the format of most commands are very similar. Understanding this format makes learning new commands easy. In the following example, Unix command usage is illustrated with ls, a command which lists filenames.

    % ls -al cs111 en104


Breaking down this line, there are three basic parts, which are the same in most Unix commands:

Command
[ls] The command is the program that you wish to run. ls is a command used to list the contents of directories.
Option flags
[-al] The option flags make the program act in a certain way. Option flags are normally preceded with a dash. The flags used in the example make ls print all files in long format.
Arguments
[cs111 en104] The types of things in the argument list will vary from command to command, and will often be file or directory names. The ls command takes file and directory names separated by spaces as arguments.
Different commands use different option flags. For the sake of the simplicity, the option flags, `-al', were grouped together. Unix commands are usually not too fussy when it comes to the order the flags are typed in or how they are broken up. The flags could have also been written as `-l -a'.

Here's another example, using lpr, a command used print your files on the laser printer.

    % lpr -Psiskel -h homework


    % lpr -h -P siskel homework


    % lpr -hP siskel homework


The three sample commands above send the file `homework' to the printer siskel (`-Psiskel') to be printed with no header page (`-h'). Some options, like `-P' take an input word directly after it. Notice that it doesn't matter if you put a space between `-P' and the printer name, but it does matter that you follow the printer name with a space, before specifying the file name(s) to print.

Understanding Directories

Understanding Directories

As stated in the previous section, directories are like folders that can contain files and other directories. By giving a directory a name that describes what it will contain, you can build a directory structure which will make it easy to find related files later on. Directory structures are most easily visualized using a tree type picture.

The following figure is a diagram of a very simple directory structure.

                                  /


    / | \


    / | \


    usr | \


    / | \


    games bin home


    / \


    / \


    chuckd ice-t


    Figure A


The very top directory in a Unix system is called the ``root directory'' and is signified by a single `/'. From the root directory, other directories branch off and hold everything from the commands you run (bin) to your home directory (chuckd or ice-t).

Types of Files in Unix

Types of Files in Unix
A file is much like a container which holds various types of information. Unix supports several different types of file, but you will only be dealing with a few of them:

Text Files
These files contain text, and can be created in a text editor, such as emacs. Also known as ASCII files, they contain ASCII codes, which represent the characters you see on the terminal. A text file can be anything from a list of your friends to a C program to a script file. There are a number of ways to view text files. We'll talk more about viewing files later.

Executable Files
These files are commands which you can run from the Unix prompt. They are usually created by compiling a C or Pascal program with gcc or pc. Both compilers generate an executable file called `a.out' by default. By typing in the name of an executable file on the command line, you can run (or execute) that file. Do not try to view these files with cat, more, or less. Doing so can lock your terminal, because executable files contain lots of strange control characters. Also, do not print out an executable file!

Directories
These special files act as folders which hold other files. A directory file contains information about all of the files stored in that directory.

When using the ls -F command to view the files in a directory, files are marked with a distinct symbol that describes the files' type. See Listing Directories with ls, for more information about listing your files.

NAS Network Attached Storage for Small Businesses

NAS Network Attached Storage for Small Businesses



New Iomega StorCenter Pro NAS 250d Models Feature Hot-Swappable SATA-II Drives for Improved Performance, Network Uptime
Iomega Corporation (NYSE:IOM), a global leader in data storage and protection solutions, today announced the next generation of its popular Iomega® StorCenter(TM) network-attached storage (NAS) devices. These new servers give small and medium business networks improved performance, reliability, and security in a convenient whisper-quiet desktop form factor.

The new Iomega StorCenter Pro NAS 250d Servers will soon be available worldwide in four new models ranging in capacity from 500GB* to 1.5TB*. All models feature the Microsoft Windows Storage Server 2003 R2 operating system, optimized for file and print services across the network. Configuration is virtually automatic with Iomega's Discovery Tool software, and the Microsoft Management Console provides a standard interface for network administration.

"Iomega's new easy-to-use StorCenter Pro 250d NAS appliances deliver on four network essentials that SMBs need in today's data-driven business environment: protecting data, securely sharing data, ease of use and saving users time and money," said Tom Kampfer, President and COO, Iomega Corporation. "These imperatives matter because secure access to corporate data is the lifeblood of a modern small or mid-sized business. By adopting hot-swappable drives and faster hardware in a desktop format, Iomega StorCenter Pro 250d NAS appliances give SMBs and network managers the improved network uptime and data security they need at an economical price. By utilizing Windows Storage Server R2, the 250d offers the reliability and compatibility of Windows with far greater performance than could be achieved in a comparable Linux-based device."

While previous generations of Iomega StorCenter Pro NAS servers have used Microsoft technologies, the new Iomega StorCenter Pro NAS 250d servers are the first Iomega NAS servers offered with Windows Storage Server 2003 R2.

"Small and medium-size businesses face highly competitive environments where growth is critical to survival. Reliable data storage, backup and archive processes are a key to success, but most SMBs don't have in-depth IT expertise," said Bala Kasiviswanathan, Group Product Manager for Storage at Microsoft. "Iomega's next generation StorCenter Pro NAS servers with Microsoft Windows Storage Server R2 give SMBs ideal solutions that are easy to implement and maintain for sharing, protecting and archiving their data."

One of the new systems announced today, the StorCenter Pro NAS 250d 500GB server, also comes with a built-in Iomega® REV® 70GB drive for state-of-the-art server backup and restore operations. Award-winning REV drives and removable 35GB and 70GB REV disks combine the speed and reliability of a hard drive with the removability of tape for lightning-quick backup and recovery.

StorCenter Pro Features and Benefits

The flagship product in today's announcement is the Iomega® StorCenter(TM) Pro NAS 250d 1.5TB Server with print capability. Like all 250d Server products announced today, it uses SATA-II hot-swappable hard drives. Three 500GB 7200-RPM hard drives provide a total capacity of 1.5TB, and hardware RAID options include RAID 5 (striping plus parity), RAID 0 (striping), and RAID 1 (mirroring). The 750GB model uses three 250GB drives and supports the same hardware RAID options. The 500GB models in today's announcement are two-drive models that support RAID 0 and RAID 1, driven by Intel® Matrix RAID technology.

Like the previous-generation 200d series, the 750GB and 1.5TB models in the 250d series feature dual Gigabit Ethernet connections with automatic load balancing and failover, and an external Ultra 320 SCSI connection. A faster Intel Celeron D 352 3.2 GHz processor replaces the previous generation's Celeron 2.5 GHz processor, improving overall performance.

Iomega StorCenter Pro NAS 250d Servers provide broad support for Microsoft file and print services. File services with 500GB models include Active Directory, Encrypting File System (EFS), Volume Shadow Copy Services (VSS), and SRM. Additional standard services with the 750GB and 1.5TB models include Distributed Files System (DFS-N and DFS-R), and File Server Resource Manager (FSRM).

Print services for the 750GB and 1.5TB models include a 5-printer license (upgradable to unlimited printers) for Microsoft Print Server.

For backup and disaster recovery, all Iomega StorCenter Pro NAS 250d models include CA BrightStor ARCserve OEM edition software with disaster recovery, version 11.5, along with EMC Retrospect Express software for client backup and recovery (5-client license included; additional licenses are available).

Compatibility

Iomega StorCenter Pro NAS 250d Servers support clients running Microsoft Windows 2000/XP Home/XP Professional/XP Professional x64, Mac® OS X 10.2.7 or higher, and Linux distributions, including Redhat 9, Madrake 10, Debian 3.0, Gentoo, and FedoraCore 3.

Supported network file protocols include Microsoft, Linux/UNIX, Apple, Internet, FTP, and WEBDAV.

Price and Availability

The StorCenter(TM) Pro 250d 500GB Server with REV® Built-In is now available for $1,999, as well as the StorCenter(TM) Pro 250d 500GB Server for $1,399. The StorCenter(TM) Pro 250d 750GB Server with Print is expected to be available December 30, 2006, for $2,799. The Iomega® StorCenter(TM) Pro 250d 1.5TB Server with Print is also expected to be available December 30, 2006, for $3,999. (All prices are suggested US retail.)

NAS Recovery, NAS Data Recovery, NAS volume recovery, NAS file recovery, NAS Recovery Software
Network Attached Storage Recovery, Network Attached Storage volume recovery, Network Attached Storage data recovery

Unix / Linux Server are more relaiable

Web Hosting Providers Praise SWsoft Plesk 8.1, for Linux/Unix, Windows Parity
News
Herndon, Virginia - (The Hosting News) - December 8, 2006 - Server virtualization and automation software company, SWsoft, has released its Plesk 8.1 for Linux/Unix and Plesk 8.1 for Windows control panel software, developed to deliver parity, new features, and functionality.

The new software adds to the Windows version many of the features found in the Linux/Unix version, designed to enable web hosting providers the ability to offer comparable solutions to customers on both platforms. Future versions of the software will be released simultaneously.

Lorena Diaz, Product Manager at SWsoft offered, ''Plesk 8.1 marks a major turning point for SWsoft and the hosting market by bringing the capabilities of the Linux/Unix version to the Windows platform. After an intensive product development effort that included the SWsoft Community Technology Preview program, Plesk 8.1 delivers a high quality control panel solution with significantly enhanced customization and management capabilities for providers, resellers and end users.''

Plesk 8.1 for Windows was developed to include functionality -- previously offered only with Plesk 8.0 for Linux/Unix -- to significantly improve ease-of-use and system management for administrators and customers. Plesk 8.1 for Linux/Unix includes several important updates, including improvements to the custom desktop, new user-friendly news management features and support for Fedora Core 5.

Feature highlights include:

• Plesk Desktop – Gives administrators and clients quick access to major management functions and immediate access to mission critical information and statistics.
• Customizable Interface Templates – Enables administrators to customize templates that can be assigned to individual users.
• Plesk Product News - Provides the latest news and information to Plesk users regarding major product updates and improvements.
• Improved Virtuozzo Integration – Delivers seamless integration with Virtuozzo, allowing hosting providers to manage more customers more efficiently. Plesk 8.1 is optimized to operate within Virtuozzo, enabling users to host up to 15 percent more virtual environments per physical server.
• Acronis True Image Server 9.1- Comes integrated with Acronis True Image 9.1, making it faster and easier for administrators to back-up servers and perform system recovery without interrupting operations.
• Autoinstaller V3 – Lets administrators deploy and upgrade multiple servers in an efficient, cost effective manner. The new architecture improves dependencies tracking and increases speed during installation to simplify support of new operating systems.

Craig Rodenberg, Vice President, Information Security, REDPLAID Managed Hosting added, ''SWsoft continues to set the standard for hosting automation and control panels with this latest release of Plesk. By upgrading the Windows version to match the features and functionality of the Linux/Unix version, Plesk 8.1 gives us the opportunity to offer our customers the most advanced control panel solution for both platforms.''

The improved integration of Plesk 8.1 with SWsoft Virtuozzo virtualization software supports SWsoft's OPEN FUSION initiative to move all of its products to a common platform and advance integration among a wide range of systems, third party applications, and custom and in-house systems. Platform benefits include reduced time-to-market for service offerings, more automated and integrated systems with single sign-on, among other solutions.

Plesk 8.1 is available now from SWsoft and its partners worldwide. The upgrade is available at no additional charge to existing customers with subscriptions or the SWsoft software update service.

SWsoft is a recognized leader in server automation and virtualization software. With more than 10,000 customers in over 100 countries, SWsoft's suite of products delivers proven performance, reliability, manageability and value. With offices around the world; SWsoft is a high growth company, funded by Bessemer Venture Partners, Insight Venture Partners and Intel Capital, offering comprehensive solutions – transparently integrated through the OPEN FUSION Initiative - including Virtuozzo, Plesk, SiteBuilder, HSPcomplete and PEM