Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

12
Day 6 Day 6 COP 3502 COP 3502 David A. Gaitros David A. Gaitros Department of Computer Department of Computer Science Science Florida State University Florida State University

Transcript of Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Page 1: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Day 6Day 6COP 3502 COP 3502

Day 6Day 6COP 3502 COP 3502

David A. GaitrosDavid A. GaitrosDepartment of Computer ScienceDepartment of Computer Science

Florida State UniversityFlorida State University

Page 2: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc Commandsalias [name ['command']]

Desciption: Creates an alias for a command or shows what alias' exist

Options: name - specifies name of aliascommand - Command you

want the alias used for

Examples:alias print "lpr -Plov260"<r>alias finger "ypcat passwd|grep -

i"<r>alias copy "cp" <r>

Demonstration:

Page 3: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc. Commandsbc [file]

Desciption: Handy desk calculator. Calculate numbers in a file or directly entered onto the screen.

Options: file - file that contains the bc commands.

Examples:bc <r> 6500 * 34 / 5

<r>Demonstration:

Page 4: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc. Commandscal [month][year]

Desciption: Displays a calendar for a month and/or year

Options: month - specifies a numeric monthyear - specifies a numeric year

Examples:cal 2 1955

cal 1955 Demonstration:

Note to self: calendar program is used for appointments. Very primitive method of keeping a schedule.

Page 5: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc. Commandscat filename(s)

Desciption: Used to show text files. Displays to whole with no breaks. It is sometimes used to concatenate files together using the redirection feature of UNIX

Options: filename - files you want to display.

Examples: cat file1 file2 file3 > file4

Demonstration:

Page 6: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc Commands

clear Desciption: clears the screen.

Used a lot. Does not affect jobs, just clears the screen of clutter.

date Desciption: Lets you see

today's date. Far too many options to really talk about right now.

timeDescription: Tells you how long

it took a command to run.

Page 7: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc Commandsecho stuff

options: stuff - a text string

Desciption: Echos the text string to standard output. Usually used inside a shell script or .tcshrc file.

Demonstration:

Page 8: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc Commandsmesg [y|n]

Desciption: Lets you control whether other people can use the write command to interrupt you with on screen messages.

Options: [y|n] - self explanotory

Examples: msg n <r>

Demonstration:

Page 9: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc. Commandssort [-b][-d][-f][-f][-m][-n[-r][-u][+fields][-o

outputfile] filename

Desciption: Sorts the lines of a text file. Very handy command you may have a need to use. Uses a very efficient sorting algorithm.

Options: -b - ingores spaces-d uses dictionary sort-f ignores capitilization-i ignores non print

characters -m merges two files into

one-n sorts based on number-r sorts in reversed order-u output same line once+fields - file contains

fields seperated by tab characters. -o outputfile - place

results in this filename- filename - file to be

sorts.

Examples: sort -dfro this.out +2

this.int Demonstration:

Page 10: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc. Commandsstty [charname char][sane][[-]tostop][-a]

Desciption: Sets the options for your terminal.

Options: charname - specifies the terminal control function you want to see.

char - Specifies the key(s) that you want use for this terminal control character.

sane - Returns terminal to a "sane" state which is useful if your editor dies.

-tostop - Turns off terminal stop mode.

tostop - Turns on terminal stop mode.

-a - displays all settings.

Examples:stty erase '^q'

Demonstration:

Page 11: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc. Commandstalk user[@computer]

Desciption: Lets you have a conversation with another user by typing messags to each other. Not that the command mesg must be turned on for this to work.

Options: @computer - use to place the address of the use if they are not located on the same machine.

Examples:talk [email protected]

Demonstration:

Page 12: Day 6 COP 3502 David A. Gaitros Department of Computer Science Florida State University.

Misc. other commands

Vacation [-l]

Description - Automatically responds to incoming messages by telling people you are on vacation. The -l options stores the names of people who in a file called .maillog

wall <r> stuff<r>

Description - Displays a message on the screen of every user on the system. You should never use this. Command is disabled in our system.