A Virus may Damage Hardware, Software or Data

  • This is default featured slide 1 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 2 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 3 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 4 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 5 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

Linux Command Summary Part 02 of 02

Linux Command Summary

Part 02 of 02


Pattern Matching with Grep

     The name grep is a contraction of get regular expression and print. Grep uses patterns which are known as regular expressions. Examples of regular expressions are.

          .                                  Any single character.

          \c                                A literal c character.

          [. . . ]                          Matches any one of the characters in the brackets.

          [c1-c2]                       Any character in the range c1−c2.
          [ˆc1-c2]                     Any character not in the range c1−c2.
          ˆ                                The start of a line.
          $                                The end of a line.
          expr*                         Matches zero or more copies of expr.
          expr1expr2                Matches the first expression followed by the second.
          expr1|expr2               Matches either the first or second expression.
          (. . . )                         Parentheses can be used for grouping.

Some examples:

          ˆ$                             Empty lines.
          ˆSTART$                 The word START on a line by itself.
          ˆ[0-9]                       Lines beginning with a digit.
          function                   Lines containing the word function.

Office-Style Applications
     There are a number of applications which provide the same kind of functionality as Microsoft Office. Documents can be exchanged with Office if they are saved in the correct format (e.g. .doc, .xls, . . . ). The following applications are part of the free software Open Office suite.


          oowriter                  Word processor.
          oocalc                     Spreadsheet.
          ooimpress               Powerpoint style presentations.
          oodraw                   Drawing program.
          oomath                   Equation editor.

In addition the following applications provide useful functionality.

          gnumeric                Spreadsheet.
          abiword                  Word processor.
          acrobat                    Adobe Acrobat reader.
          gsview                    PostScript viewer.
          scribus                    Page layout (like Pagemaker).

Graphics Applications

          gthumb                   Graphics viewing program.
          gimp                       Photoshop-like graphics program.
          xfig                        Vector-dsrawing program.

Data Processing Applications
     Our systems have a number of useful data processing applications installed.

          R                            Local statistics software.
          Splus                     A commercial version of R.
          sas                         A database system for corporations
                                        which does some statistics.
          perl                       A report generation language.
          awk                      An older report generation language.
          sed                       A non interactive (stream editor).

Software Development
     Unix is without peer when it comes to software development. Many developers produce software by developing it under Linux and simply cross-compiling for Windows.

           java                    Java runtime.
          cc                        C Compiler.
          c++                     C++ compiler.
          f77                      Fortran77 compiler.
          gfortran              Fortran95 compiler.
          python                A hot new scripting language.
          ruby                    A less hot new scripting language.
          tcl                       An older scripting language.
          umb-scheme      A scheme (aka Lisp) interpreter.
          octave                A language like Matlab.
          anjuta                A integrated C/C++ development environment.
          make                 A software build utility.







Share:

Linux Command Summary Part 01 of 02


Linux Command Summary

Part 01 of 02


Basic Information
     The following commands can be used to find out basic information about the machine you are using.
         
          date                Print the time and date.
          cal                  Print a calendar.
          who                Show who is currently logged on to this machine.
          last                 Show who has logged in recently.
          uptime           Show how long the machine has been up.
          top                 Show the machine load and processes.
 (Type “q” to exit from top.)

Getting Help
     The following commands give access to a variety of on-line help systems.

          man cmd                The official on-line manual.
          man -k topic           Keyword search of the manual.
          apropos topic         Equivalent to man -k.
          gnome-help           The (graphical) Gnome help system.
          info                       The Gnu info system.

     The manual (either using the man command or through the gnome-help interface) should be the first place you use to obtain information about the system. The info command will get you access to a set of longer documents about some of the installed software.

The File System
     The Linux file system is organised as a set of nested containers called directories (or folders). Each directory can be used to hold other directories or files. The position of each file or directory is described by its pathname. This is a sequence of names separated by slashes (/).
      
          /dir1/dir2/. . ./dirn/filename

     At any given time there is a current working directory and simple names are taken to refer to files within this directory. File names can also be specified relative to the current directory using . to indicate the current directory and .. to indicate “up one level” from the current directory.

     There are a large number of commands related to obtaining information about files and directories in the system.

          pwd                     Print the path name of the current directory.
          cd dir                  Change the working directory to the one specified.
          ls                        List the names of the files in the current directory.
          ls -l                    List file names with additional information.
          du                      Report disk usage (in 1 kilobyte blocks).
          quota                 Report on disk usage and quota.
          wc                     Report lines, words and characters in a file.
          wc -l                 Report the number of lines in a file.
          wc -w               Report the number of words in a file.

Copying, Moving and Removing Files
     A number of commands can be used to copy and move files. Most of the file names here can be simple names or either relative or full pathnames.

          cp old new             Make a copy of a file under a new name.
          mv old new            Rename a file.
          cp files dir             Copy the specified files to the given directory.
          mv files dir            Move one or more files to a directory.
          rm files                  Remove the named files.
          rmdir dir                Remove the named (empty) directories.
          rm -r files              Recursively remove the named files and directories.

Redirecting Output
     The output of Linux commands can be redirected to and from files.

          cmd > file             Redirect output to the given file (overwrites).
          cmd >> file          Append output to the given file.
          cmd < file            Take input from the given file.
          cmd1 | cmd2        Output from one program into another (a “pipe”).

     The use of pipes is what makes Linux such a flexible system. For example,

          who | wc -l

     will count the number of users currently logged in.


Basic Operations on Files

          cat                     Concatenate and print files (on screen).
          tr                       Transliterate character sets.
          grep                   Print lines matching a pattern.
          sort                    Sort the lines of a file.
          head                  First few lines of a file.
          tail                    Last few lines of a file.
          more                 Page at a time display.
          less                   Alternative page at a time display.

     These programs can be combined using the redirection operations above. Here is how to concatenate three files together.

          cat file1 file2 file3 > combined

     Here is how to convert all uppercase letters in a file to lower case.

          tr [A-Z] [a-z] mixed > lcase

     Here is to find the lines in a file which contain the word Unix

          grep Unix file

     Find the number of lines which contain the word Unix.

          grep Unix file | wc -l












Share:

Unix/Linux Command Reference




Unix/Linux Command Reference















Share:


THE FILE SYSTEM ON LINUX

Part-01 of Part-03


The most important role of the system is to provide a file system. From the point of view of the user, there are three kinds of files: ordinary disk files, directories, and special files.

* Ordinary files
A file contains whatever information the user places on it, for example, symbolic or binary (object) programs. No particular structuring is expected by the system. A file of text consists simply of a string of characters, with lines demarcated by the newline character. Binary programs are sequences of words as they will appear in core memory when the program starts executing. A few user programs manipulate files with more structure; for example, the assembler generates, and the loader expects, an object file in a particular format. However, the structure of files is controlled by the programs that use them, not by the system.

* Directories
Directories provide the mapping between the names of files and the files themselves, and thus induce a structure on the file system as a whole. Each user has a directory of his own files, he may also create sub-directories to contain groups of files conveniently treated together. A directory behaves exactly like an ordinary file except that it cannot be written on by unprivileged programs, so that the system controls the contents of directories. However, anyone with appropriate permission may read a directory just like any other file. The system maintains several directories for its own use. One of these is the root directory. All files in the system can be found by tracing a path through a chain of directories until the desired file is reached. The starting point for such searches is often the root. Other system directories contain all the programs provided for general use; that is, all the commands. As will be seen, however, it is by no means necessary that a program reside in one of these directories for it to be executed.

Files are named by sequences of 14 or fewer characters. When the name of a file is specified to the system, it may be in the form of a path name, which is a sequence of directory names separated by slashes, 5/??, and ending in a file name. If the sequence begins with a slash, the search begins in the root directory. The name /alpha/beta/gamma causes the system to search the root for directory alpha, then to search alpha for beta, finally to find gamma in beta gamma may be an ordinary file, a directory, or a special file. As a limiting case, the name "/** refers to the root itself.

A path name not starting with */** causes the system to begin the search in the user's current directory. Thus, the name alpha/beta specifies the file named beta in subdirectory alpha of the current directory. The simplest kind of name, for example, alpha, refers to a file that itself is found in the current directory. As another limiting case, the null file name refers to the current directory.

The same non-directory file may appear in several directories under possibly different names. This feature is called linking; a directory entry for a file is sometimes called a link. The Unix system differs from other systems in which linking is permitted in that all links to a file have equal status. That is, a file does not exist within a particular directory: the directory entry for a file consists merely of its name and a pointer to the information actually describing the file. Thus a file exists independently of any directory entry, although in practice a file is made to disappear along with the last link to it.

Each directory always has at least two entries. The name ". ** in each directory refers to the directory itself. Thus a program may read the current directory under the name "." without knowing its complete path name. The name “.." by convention refers to the parent of the directory in which it appears, that is, to the directory in which it was created..

The directory structure is constrained to have the from of a rooted tree. Except for the special entries "." and "..", each directory must appear as an entry in exactly one other directory, which is its parent. The reason for this to simplify the writing of programs that visit subtrees of the directory structure, and more important, to avoid the separation of portions of the hierarchy. If arbitrary links to directories were permitted, it would be quite difficult to detect when the last connection from the root to a directory was severed.





Share:


HARDWARE AND SOFTWARE ENVIRONMENT

On Linux OS


The PDP-11/70 on which the Research Unix system is installed is a 16-bit word (8-bit byte) computer with 768K bytes of core memory; the system kernel occupies 90K bytes about equally divided between code and data tables. This system, however, includes a very large number of device drivers and enjoys a generous allotment of space for I/O buffers and system tables, a minimal system capable of running the software mentioned above can require as little as 96K bytes of core altogether. There are even larger installations, see the description of the PWB/UNIX systems (4, 5), for example. There are also much smaller, though somewhat restricted, versions of the system [6].

Our own PDP-11 has two 200-Mb moving-head disks for file system storage and swapping. There are 20 variable-speed communications interfaces attached to 300- and 1200-baud data sets, and an additional 12 communication lines hard-wired to 9600-baud terminals and satellite computers. There are also several 2400- and 4800-baud synchronous communication interfaces used for machine-to-machine file transfer. Finally, there is a variety of miscellaneous devices including nine-track magnetic tape, a line printer, a voice synthesizer, a phototypesetter, a digital switching network, and a chess machine.


The preponderance of Unix software is written in the abovementioned C language [7]. Early versions of the operating system were written in assembly language, but during the summer of 1973, it was rewritten in C. The size of the new system was about one-third greater than that of the old. Since the new system not only became much easier to understand and to modify but also included many functional improvements, including multiprogramming and the ability to share reentrant code among several user programs, we consider this increase in size quite acceptable.

Share:


The UNIX Time-Sharing System*
D. M. Richie and K. Thompson

ABSTRACT
Unix is a general-purpose, multi-user, interactive operating system for the larger Digital Equipment Corporation PDP-11 and the Inter data 8/32 computers. It offers a number of features seldom found even in larger operating systems, including

(1) A hierarchical file system incorporating demount table volumes,
(2) Compatible file, device, and inter-process 1/0,
(3) The ability to initiate asynchronous processes,
(4) System command language select table on a per-user basis,
(5) Over 100 subsystems including a dozen languages,
(6) High degree of portability.
This paper discusses the nature and implementation of the file system and of the user command interface.

1. INTRODUCTION
There have been four versions of the Unix time-sharing system.
12 The earliest (circa 1969-70) ran on the Digital Equipment Corporation PDP-7 and -9 computers. The second version ran on the unprotected PDP-11/20 computer. The third incorporated multi programming and ran on the PDP-11/34, 140, 145, 160, and /70 computers, it is the one described in the previously published version of this paper, and is also the most widely used today. This paper describes only the fourth, current system that runs on the PDP-11/70 and the Inter data 8/32 computers. In fact, the differences among the various systems is rather small; most of the revisions made to the originally published version of this paper, aside from those concerned with style, had to do with details of the implementation of the file system.
Since PDP-11 Unix became operational in February, 1971, over 600 installations have been put into service. Most of them are engaged in applications such as computer science education, the preparation and formatting of documents and other textual material, the collection and processing of trouble data from various switching machines within the Bell System, and recording and checking telephone service orders. Our own installation is used mainly for research in operating systems, languages, computer networks, and other topics in computer science, and also for document preparation.
Perhaps the most important achievement of Unix is to demonstrate that a powerful operating system for interactive use need not be expensive either in equipment or in human effort: it can run on hardware costing as little as $40,000, and less than two man-years were spent on the main system software. We hope, however, that users find that the most important characteristics of the system are its simplicity, elegance, and ease of use.

Besides the operating system proper, some major programs available under Unix are :

A. C compiler
B. Text editor based on QED[1];
C. Assembler, linking loader,
D. Symbolic debugger Phototypesetting and equation setting programs[2, 3]
E. Dozens of languages including Fortran 77, Basic, Snobol, APL, Algol 68, M6, TMG, Pascal

There is a host of maintenance, utility, recreation and novelty programs, all written locally. The Unix user community, which numbers in the thousands, has contributed many more programs and languages. It is worth noting that the system is totally self-supporting. All Unix software is maintained on the system; likewise, this paper and all other documents in this issue were generated and formatted by the Unix editor and text formatting programs.


Share:

Mark Weiser Talk About Technologies

Mark Weiser Talk About Technologies





"The most profound technologies are those that disappear. They weave themselves in to the fabric of everyday. Life until they are indistinguishable from it."

Share:

Popular Posts

Labels

Recent Posts

Unordered List

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Aliquam tincidunt mauris eu risus.
  • Vestibulum auctor dapibus neque.

Pages

Theme Support

Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.