Upcoming Events

Executive conference

Cloud Connect March 16-18

Comprehensive thought leadership for executives, IT professionals and developers. Topics include: the ROI, cost and economics of on-demand computing; Migration strategies to move from on-premise to cloud-based IT; Vertical cloud specialization, tailoring features and architectures to specific applications, industries, and customer ecosystems

More Events »

Subscribe to Newsletter

  • Keep up with all of the latest news and analysis on the fast-moving IT industry with Network Computing newsletters.
Sign Up


Learning Essential Command and Files: Listings

Listing 1. Sample output from some UNIX commands

A. The date command produces a formatted date/time string:

$ date
Sun Mar 20 08:15:48 MST 1988
$ []

B. Use the cal command to print a monthly calendar:

$ cal 12 1988
   December 1988
 S  M Tu  W Th  F  S
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
$ []

C. The uname command tells you about your system hardware and software:

$ uname -a
UNIX omni SYSTEMS 3.51 mc68k
$ []

Listing 2. The command prints a listing of a directory

A. The standard System V ls command produces a single-column directory listing:

$ ls
07start.mm
07start.prn
listing1
listing2
listing3
listing4
outline save
$ []

On Berkeley UNIX, ls produces a multi-column listing when output goes to the screen.

B. A long directory listing shows file and directory detail:

$  ls -l
total 55
-rw-r--r--  1 arh   omni     9693 Mar 21 15:19 07start.mm
-rw-r--r--  1 arh   omni    11026 Mar 21 21:26 07start.prn
-rw-r--r--  1 arh   omni      536 Mar 21 21:07 listing1
-rw-r--r--  1 arh   omni      417 Mar 21 21:08 listing2
-rw-r--r--  1 arh   omni      965 Mar 21 21:23 listing3
-rw-r--r--  1 arh   omni      761 Mar 21 21;10 listing4
-rw-r--r--  1 arh   omni     2470 Mar 17 21:52 outline
drwxr-xr-x  2 arh   omni       48 Mar 15 14:03 save
$[]

Listing 3. Basic editing with Ed

A. Create a text file by appending lines:

$ ed sample.txt
?sample.txt
a
This is a sample file.  It is being created with the 
help of the ed text editor.
.
w
81
[]

B. View the lines you entered using the Ed print (p) command:

l,$p
This is a sample file.  It is being created with the 
help of the ed text editor.
[]

C. Terminate editing by typing the Ed quit (q) command:

q
$ []
Print This Page


e-mail Send as e-mail

Best of the Web

Data deduplication: Declawing the clones

Data deduplication is emerging as a critically important new arrow in the storage administrator's quiver to answer hard questions about the increasing problem in storage growth costs.

Quick Read

Compression, Encryption, Deduplication, and Replication: Strange Bedfellows

One of the great ironies of storage technology is the inverse relationship between efficiency and security: Adding performance or reducing storage requirements almost always results in reducing the confidentiality, integrity, or availability of a system.

Quick Read

WAN Optimization Whitelists and Blacklists

Optimization is a fantastic way of saving money and creating really happy customers at the same time, but it doesn't work flawlessly for all applications.

Quick Read

WAN Optimization as a Managed Service: It's Not About the Cost

This insight examines how organizations outsourcing their WAN optimization initiatives to a third-party go about achieving their goals for application performance, reducing operational costs, and streamlining enterprise infrastructure.

Quick Read

  Sponsored Links

Premium Content

Data Centers Gone Wild
February 22, 2010

NWC


Salary

Video