csci 330 the unix system n.
Download
Skip this Video
Download Presentation
CSCI 330 The UNIX System

Loading in 2 Seconds...

play fullscreen
1 / 7

CSCI 330 The UNIX System - PowerPoint PPT Presentation


  • 90 Views
  • Uploaded on

CSCI 330 The UNIX System. Shell History and Directory Stacks. Shell History. shell keeps a record of previously entered commands so that they can later be: Re-executed Edited Commands are saved Per session Per user. Shell History.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CSCI 330 The UNIX System' - nevina


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
csci 330 the unix system

CSCI 330The UNIX System

Shell History and Directory Stacks

shell history
CSCI 330 - The UNIX SystemShell History
  • shell keeps a record of previously entered commands so that they can later be:
    • Re-executed
    • Edited
  • Commands are saved
    • Per session
    • Per user
shell history1
CSCI 330 - The UNIX SystemShell History
  • Each previously run command gets a sequential event number
  • To view the history buffer:

Syntax: history [-c] [count]

      • If no options are supplied, list all

Useful options:

-c clear history

shell history2
CSCI 330 - The UNIX SystemShell History
  • You can re-execute history events:
    • By the event number

% !5

    • By the number relative to current event

% !-3

    • By the text it contains

% !ls

directory stacks
Directory Stacks
  • To keep track of multiple directories using stack structure
  • To maintain a directory stack, we use the following three commands:
    • pushd
    • popd
    • dirs

CSCI 330 - The UNIX System

5

pushd
PUSHD
  • pushd (with no argument)

to travel between two top stack entries

  • pushd directory

to push directory on top of stack

  • pushd +n

to rotate nth entry to the top of stack

CSCI 330 - The UNIX System

6

popd and dirs
POPD AND DIRS
  • popd (with no argument)

to remove the top directory and changes to the next stack entry

  • popd +n

to remove the nth directory from stack

  • dirs:

to display all directory entries.

The top entry is listed at the leftmost position

CSCI 330 - The UNIX System

7

ad