C Shell Command Line Examples

This section provides some C shell command line examples with explanations.

Below are some C shell command line examples with explanations:

      Displays the values of all shell variables.

set history=50
      Tells the shell to keep track of the last 50 commands.

set noclobber
      Don't overwrite an existing file

set filec
      Provide me filename completion when I hit ESC

set ignoreeof
      Don't log me out when I hit ^D (eof)

set history 40
      Keep last 40 commands in a buffer

set histsave 40
      Keep last 40 commands in file .history

set prompt="\!%"
      Sets the prompt to be the command number and %
      ! in prompt means the command number

      Displays the date.

cat > myself
(Type in some words about yourself)
      Creates a file and lets you to enter text from the keyboard.

ls -l
      Lists the contents of the current directory in long format.

alias dir ls
      Assigns "ls" to the alias name "dir".

dir -l
      Same as "ls -l".

cat myself
      Displays the contents of "myself" on the screen.

      Displays the history list.

      Repeats the 4th command in the history list.

sleep 200
      A dummy command. It runs for 200 seconds. 
      "Ctrl-C" cancels the execution of any command.

      Repeats the last command "sleep 200".
      "Ctrl-Z" stops the execution of any command.

      Lists background jobs.

kill %1
      Kills the first background job.

command &
      Runs the command in the background

fg %1
      Brings the first job into the foreground

bg %1
      Starts the first job (stopped currently) in the background

stop %1 
      Stops the first job

nohup command &
      Run the command in background and detach it from terminal.
      So you can logout and let the job continue.

Table of Contents

 About This Book

 1957 - FORTRAN Language Developed by IBM

 1970 - UNIX Operating System Developed by AT&T Bell Labs

 1971 - FTP Protocol Created by Abhay Bhushan

 1972 - C Language Developed by Dennis Ritchie

 1976 - vi Text Editor Developed by Bill Joy

 1977 - Apple II Designed by Steve Jobs and Steve Wozniak

 1977 - The Bourne Shell Developed by Stephen Bourne

1978 - The C Shell Developed by Bill Joy

 What Is the C Shell?

 C Shell Command Line

 Command Line History Substitution

 Command Line Alias Substitution

 Command Line Input and Output Redirection

 Command Line Variable Substitution

C Shell Command Line Examples

 ".cshrc" - C Shell Script File and

 1978 - Bash (Bourne-Again Shell) Developed by Brian Fox

 1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer

 1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman

 1984 - Macintosh Developed by Apple Inc.

 1984 - X Window System Developed a MIT Team

 1991 - WWW (World Wide Web) Developed by Tim Berners-Lee

 1991 - Gopher Protocol Created by a University of Minnesota Team

 1995 - Java Language Developed by Sun Microsystems

 1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf

 2002 - .NET Framework Developed by Microsoft


 PDF Printing Version