Day 7 More Unix Commands and Utilities - PowerPoint PPT Presentation

About This Presentation
Title:

Day 7 More Unix Commands and Utilities

Description:

UNIX is a multi-tasking operating system which means it can keep track of many ... you have to do is place an ampersand(&) behind the command and hit the return key. ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 13
Provided by: davidg97
Learn more at: http://www.cs.fsu.edu
Category:

less

Transcript and Presenter's Notes

Title: Day 7 More Unix Commands and Utilities


1
Day 7More Unix Commands and Utilities
  • David A. Gaitros
  • Department of Computer Science
  • Florida State University

2
Process Commands
  • UNIX is a multi-tasking operating system which
    means it can keep track of many different
    processes at once. You can start a command and
    put it in the background. This allows you to
    continue to use the UNIX prompt and run other
    commands. All you have to do is place an
    ampersand() behind the command and hit the
    return key.
  • Example
  • emacs testshell.c

3
Process Commands
  • at -f filename-m time date
  • at -l
  • at -r job
  • Desciption Schedules a command to be run at a
    particular time. Great for running CPU intensive
    processes at a later date.
  • Options
  • -f filename - Name of file that contains the
    command.
  • -m - Sends an electronic message when
    completed.
  • time - Indicates when you want it executed.
  • date - Indicates what day you want it run.
  • -l List the names of commands that are already
    schedules
  • -r job - cancels the job the you previously
    schedules.
  • Examples
  • at midnight ltrgt
  • lpr Plov260 big.report
    ltrgt
  • dltrgt
  • Demonstration

4
Process Commands
  • bg job
  • Desciption Continues a stopped job in the
    background. To find out which jobs are running,
    type jobs.
  • Options
  • job - The job number you want to continue.
  • example
  • jobs 7713 ltrgt
  • Demonstration
  • start emacs in the background and show job
    number.

5
Process Commands
  • kill job
  • Desciption Stops a job running in the
    background. .
  • Options
  • job - The job number you want to kill
  • example
  • kill 7713 ltrgt
  • Demonstration
  • start emacs in the background and kill job
    number.

6
Process Commands
  • cancel requestID
  • Desciption Cancels a print job.
  • Options
  • requestID - Specifies the print job number to
    be cancelled listed by the lpstat command.
  • Examples
  • lpstate ltrgt or
  • lpq ltrgt
  • cancel lj-1765 ltrgt

7
Process Commands
  • id
  • Desciption Tells you what your user and group
    IDs are so that you can tell your wizard what
    they are when asked.
  • Demonstration
  • id ltrgt

8
Process Commands
  • ps -a-l-ttty-u-x
  • Desciption Displays information about your
    processes (jobs).
  • Options
  • -a - all processes for everyone.
  • -l - displays longer version
  • -ttty - Displays list of processes start by
    terminal tty.
  • -u - displays user oriented report.
  • -x - Displays all processes running in the
    background not attached to a terminal
  • Examples
  • ps -al ltrgt
  • Demonstration start emacs in the background and
    show this.

9
Process Management
  • script -afilename
  • Desciption Stores the conversation you're having
    with UNIX in a file. To exit this, type exit.
  • Options
  • -a - Adds information to the file.
  • filename - File where you want it stored.
  • Examples
  • script -a mylog
  • Demonstration

10
Process Management
  • set variable value
  • DesciptionSets a shell variable to the value you
    specify or displays the value of the shell
    variable. This will stay active until you logoff
    or change it again.
  • Options
  • variable - some UNIX shell variable.
  • value - a string value
  • Examples
  • set workdir\gaitrosd
  • Demonstration

11
Process Management
  • setenv variable value
  • Desciption Similar to the set, it sets the
    value of an environment variable to some value
  • Options
  • variable - some UNIX shell variable.
  • value - a string value
  • Examples
  • setenv path path\home\here\bin
  • Sets the path variable to its' current value plus
    \home\here\bin

12
A useful command
  • sftp (Secure File Transfer Protocol)
  • demonstration
  • xterm (x-terminal utility). Allows for the use of
    windows type commands in the UNIX environment.
    The following command is used in X-WIN32.
  • xterm -ls -sb -display DISPLAY
  • Demonstration
  • xterm
Write a Comment
User Comments (0)
About PowerShow.com