MCSR_logo.jpg (56K)
Home My MCSR Supercomputers Software Research Education
Login
Quick Links:

FAQs
Minicamp
Chemistry
insideHPC Blog
Current Jobs
Job History
Mathematica
Training
News
Contact Us

Introduction to Unix, Part 1
Mimosa

Other MCSR Seminars

Description

Unix is the operating system for cypress, sunset, sweetgum, magnolia, mimosa, cedar, and redwood. This seminar will give an overview of Unix and its function in the context of the Internet. The following topics will be covered: Logging on to the system; Logging off the system; Changing your password; The UNIX file system; Understanding commands and processes; The shell; Using UNIX commands; Looking-up commands in the on-line manual.

Scope

The most recent offering of this seminar was June, 2010, at Jackson State University. The general information presented here will be valid indefinitely; however, the exercises, where present, are only meant to be valid for the date of the seminar. To request another offering of this seminar, please contact the MCSR staff.

Text in red denotes commands to be entered at the command prompt by the workshop student.

Outline

  1. Getting Started
    • Log in to mimosa
    • Changing your password
  2. Concepts
    • What is an operating system?
    • The UNIX file system
      Linux File Hierarchy
    • Understanding commands and processes
    • The shell
  3. Commands
    • A few essential UNIX commands
      • pwd - print working directory - print the contents of the working directory
      • ls - list - list contents of directory
      • cd - change directory - changes the working directory
      • cat - catenate - print the contents of a file
      • more - print the contents of a file ... with scrolling
      • cp - copy of a file
      • rm - remove one or more files
    • Practice
      1. Run the workshop setup script
        mimosa> /home/appl/mpiworkshop/gounix
      2. What is your working directory?
        mimosa> pwd
      3. What files and directories are in your working directory?
        mimosa> ls
      4. Change your working directory to be the directory corresponding to your student number. Confirm your success, and list the files in your new working directory.
        mimosa> cd workshop
      5. What is in the file called myfile ?
        mimosa> cat myfile
      6. Make a copy of myfile in the same directory, and call the new file mynewfile
        Confirm your success by listing the files in your new working directory.
        mimosa> cp myfile mynewfile
        mimosa>
        ls
      7. Remove myfile
        Confirm your success by listing the files in your new working directory.
        mimosa> rm myfile
        mimosa>
        ls
      8. What is in the file called goodfile?
        mimosa> cat goodfile
        • more - Displays text one screen at a time.
        mimosa> more goodfile
    • Using UNIX commands
      1. About commands
        • man - The man command which is short for manual provides in depth information about the requested command or allows users to search for commands related to a particular keyword.
        mimosa> man ls
      2. Where are commands located?
        • echo - Echo's to the screen what you type after echo. Echo is useful for producing diagnostics in command files, for sending known data into a pipe, and for displaying the contents of environment variables.
        mimosa> echo $PATH
        mimosa> which ls
        mimosa> which man
        mimosa> man which
      3. Entering commands
      4. Command substitution
        mimosa> date
        mimosa> echo The date is
        mimosa> echo The date is `date`
        mimosa> man date
      5. Redirecting standard input and output
        mimosa> date > today
        mimosa> cat today
        mimosa> date >> today
        mimosa> cat today
        mimosa> date > today
        mimosa> cat today
        mimosa> echo today
        mimosa> mail your-email-address < today
      6. Connecting commands together
        • who - Displays who is on the system.
        mimosa> who
        • wc - Short for word count, wc displays a count of lines, words, and characters in a file.
        mimosa> wc hello.c
        mimosa> man wc
        mimosa> wc -l hello.c
        mimosa> who | wc -l
        mimosa> who | wc -l | wc -l
        mimosa> who | wc -l | wc -l | wc -l
    • Looking-up commands in the on-line manual
  4. For Further Information
    • UnixHelp

Last Modified:June 07, 2010 05:21:08.   Copyright © 1997-2012 The Mississippi Center for Supercomputing Research. All Rights Reserved.   The University of Mississippi
Valid RSS