.Open Typical Unix Commands . UNIX Commands beginning ABCD adb::command, a general-purpose debugger. apropos::command, locate commands by keyword lookup. ar::command, maintain portable archive or library. as::command, assembler. at::command, execute commands at a later time. awk::command, pattern scanning and processing language. banner::command, make posters. basename::command, display portions of pathnames. batch::command, execute commands at a later time. bc::command, arbitrary precision arithmetic language. biff::command, give notice of incoming mail messages, named after the programmers dog. cal::command, display a calendar. calendar::command, reminder service. cancel::command, send/cancel requests to an LP print service. cat::command, concatenate and display files. cc::command, C compiler. cd::command, change working directory. chmod::command, change the permissions mode of a file. chown::command, change owner. clear::command, clear the terminal screen. cmp::command, compare two files. col::command, reverse line-feeds filter. comm::command, select or reject lines common to two sorted files. compress::command, compress, uncompress files or display expanded files. cp::command, copy files. crontab::command, user crontab file. crypt::command, encode or decode a file. csh::command, shell command interpreter with a C-like syntax. csplit::command, split a file with respect to a given context. ctags::command, create a tags file for use with ex and vi. cut::command, cut out selected fields of each line of a file. date::command, print and set the date. dc::command, desk calculator. df::command, display status of disk space on file systems. diff3::command, 3-way differential file comparison. diff::command, display line-by-line differences between pairs of text files . du::command, display the number of disk blocks used . . UNIX Commands beginning with EFGH echo::command, echo arguments to standard output. ed::command, text editor. edit::command, text editor (variant of ex for casual users). egrep::command, search a file for a pattern using full regular expressions. eject::command, eject media device from drive. ex::command, text editor. expand::command, expand TAB characters to SPACE characters, and vice versa. expr::command, evaluate arguments as an expression. factor::command, obtain the prime factors of a number. false::command, provide truth values. fgrep::command, search a file for a character string. file::command, determine the type of a file by examining its contents. find::command, find files. finger::command, display information about local and remote users. fmt::command, simple text formatters. ftp::command, file transfer program. getopt::command, parse command options. getoptcvt::command, parse command options. getopts::command, parse command options. grep::command, search a file for a pattern. head::command, display first few lines of files. hostname::command, set or print name of current host system. . UNIX Commands beginning with IJKLMN kill::command, terminate a process by default. ksh::command, KornShell, a command and programming language. last::command, display login/logout information about users and terminals. ld::command, link editor for object files. lex::command, lexical analysis program generator. ln::command, make hard or symbolic links to files. login::command, sign on to the system. lp::command, send/cancel requests to an LP print service. lpstat::command, print information about the status of the LP print service. ls::command, list the contents of a directory. m4::command, macro processor. mail::command, read mail or send mail to users. mailx::command, interactive message processing system. make::command, maintain, update, and regenerate related programs and files. man::command, display reference manual pages; find pages by keyword. mesg::command, permit or deny messages. mkdir::command, make directories. more::command, browse or page through a text file. mv::command, move files. nawk::command, pattern scanning and processing language. nice::command, run a command at low priority. nl::command, line numbering filter. nm::command, print name list of an object file. nohup::command, run a command immune to hangups and quits. nroff::command, format documents for display or line-printer. . UNIX Commands beginning with OPQR od::command, octal dump. pack::command, compress and expand files. passwd::command, change login password and password attributes. paste::command, merge same lines of several files or subsequent lines. pg::command, files perusal filter for CRTs. pr::command, print files. ps::command, display the status of current processes. pwd::command, working directory name. rcp::command, remote file copy. renice::command, alter priority of running processes. rlogin::command, remote login. rm::command, remove files or directories. rmdir::command, remove files or directories. rsh::command, shell, the standard, job control shell, and restricted. . UNIX Commands beginning with STUVWXYZ script::command, make typescript of a terminal session. sed::command, stream editor. set::command, set and unset local or global environment variables. sh::command, shell, the standard, job control shell, and restricted. shutdown::command, close down the system at a given time. sleep::command, suspend execution for an interval. sort::command, sort and/or merge files. spell::command, find spelling errors. split::command, split a file into pieces. strings::command, find printable strings in an object or binary file. strip::command, strip symbol table, debugging and line number information. stty::command, set the options for a terminal. sum::command, print checksum and block count for a file. tabs::command, set tabs on a terminal. tail::command, deliver the last part of a file. talk::command, talk to another user. tar::command, create (tape) archives, and add or extract files. tbl::command, format tables for nroff or troff. tee::command, replicate the standard output. telnet::command, user interface to a remote system using the. test::command, condition evaluation command. tftp::command, trivial file transfer program. time::command, time a command. touch::command, update access time and/or modification time of a file. tr::command, translate characters. troff::command, typeset or format documents. true::command, provide truth values. tset::command, establish or restore terminal characteristics. tty::command, get the name of the terminal. umask::command, set file-creation mode mask. uname::command, print name of current system. uncompress::command, compress, uncompress files or display expanded files. unexpand::command, expand TAB characters to SPACE characters, and vice versa. uniq::command, report repeated lines in a file. unpack::command, compress and expand files. unset::command, set and unset local or global environment variables. users::command, display a compact list of users logged in. uudecode::command, encode a binary file, or decode its ASCII representation. uuencode::command, encode a binary file, or decode its ASCII representation. vedit::command, screen-oriented (visual) display editor based on ex. vi::command, screen-oriented (visual) display editor based on ex. view::command, screen-oriented (visual) display editor based on ex. vipw::command, edit the password file. w::command, who is logged in, and what are they doing. wait::command, wait for a process to finish. wc::command, display a count of lines, words and characters in a file. whatis::command, display a one-line summary about a keyword. whereis::command, locate the binary, source, and manual page files. who::command, who is on the system. whoami::command, display the effective current username. whois::command, Internet user name directory service. write::command, write to another user. yacc::command, yet another compiler-compiler. ypcat::command, print values in a NIS database. ypmatch::command, print the value of one or more keys from a NIS map. yppasswd::command, change your network password in the NIS database. ypwhich::command, return name of NIS server or map master. zcat::command, compress, uncompress files or display expanded files. .Close Typical Unix Commands file_name::=`any sequence of letters, digits, underscores, +. -, :, ., #,...`. directory_name::=$file_name. A directory is a specially formatted file in UNIX so the sames names are used for directories and files. pathname::= $relative_path_name | $absolute_path_name. relative_path_name::=$directory_name "/" $directory_name "/" ... "/" $filename. .See relative_path absolute_path_name::="/" $relative_path_name | "~" "/" $relative_path_name. shell_wild_card::="*" | "?" | "[" characters "]". punctuation::= ";" | "&" | "|" | "&&" | "||" | parentheses | brackets | braces | quotation_marks. CWD::=`current working directory`. relative_path::=`The $CWD is prefixed in front of relative paths`. echo::command, output values of arguments. read::command, take input for reader and set variable equal to it. export::command, place shell variable and value into the environment. variable_name::= letter `anynumber of letters and digits`. show_the_value_of_a_variable::="echo " "$"$variable_name. setting_a_shell_variable::= $variable_name"="value". -- no spaces near the =! getting_a_shell_variable_from_the_user::="read " $variable_name. adding_a_variable_to_the_environment::= "export " $variable_name. case_statement::="case" $expression "in" $eoln $case_body eoln "esac". case_body::= $case ... . case::= $pattern ")" $commands ";;" $eoln. Notice the double commas if_statement::="if" $commands $eoln "then" $commands $O( "else" $commands ) "fi". O::=optional test_command::= "[" $test_expression "]". commands::= a sequence of commands spearated by semicolons etc. eoln::= the end of line character or a semicolon. expression::=$test_command | $expr_command | .... pattern::= just like a wild card description of a file name. trap::command, sets an action to be carried out on reciept of one of a list of signals. fortune::program, prints out a pseudo fortune cookie. setting_a_end_of_shell_trap::="trap " "'" command "'" 0. asking_for_a_fortune_cookie::="/usr/games/fortune " options. . List of UNIX Standard Directory Names .As_is wrk working files .As_is tmp temporary files that can be removed once used .As_is bin binary files and executable scripts .As_is src source code for programs .As_is lib libraries: data for other programs to use .As_is adm Administrative files .As_is etc for unix system data files .As_is misc miscelaneous files .As_is include header files to be included in C & C++ program .As_is News Used by tin and other newreaders .As_is Mail Used by elm for handling mail .As_is mail Used by pine for mail messages .As_is usr Files need by users but owned by the system .As_is u where we put home directories .As_is var various variable administrative and temporary files .As_is sbin shared binaries .As_is share shared directories .As_is mail for mail .As_is local Things we put on the system .As_is spool for things waiting to be processed . UNIX Definitions mkdir::command, $make_a_new_directory, $make_a_new_path. cd::command, $change_to_directory. make_a_new_directory(`D`)::=mkdir `D`. make_a_new_path(`P`)::=mkdir -p `P`. change_to_directory(`D`)::= cd `D`. Before `D` must be an executable directory. Afterwards the $CWD is `D`. md::DOS_command=UNIX(mkdir). CWD::=`current working directory`. stty::command, $set_a_key_to, sets the $terminal to a particular input/output mode. export::command, places variable and value in the $environment. set_a_key_to::= stty $stty_option '`tap the key`' option::=$erase | $quit | $intr | $kill | ... . erase::$stty_option=erase, $set_your_new_erase_key quit::$stty_option=quit. $set_a_key_to kill and force a dump of running process. intr::$stty_option=intr. $set_a_key_to interupt a process - CTRL/C is normal. kill::$stty_option=kill. $set_a_key_to erase every thing you've typed. set_your_new_erase_key::= stty erase '`tap the key`' set_the_terminal_environment(`t`)::= TERM=`t`; export TERM check_the_terminal_environment::= following .As_is echo $TERM TERM::variable, put in the $environment to indicate the kind of $terminal you are thought to be using. TERMCAP::variable, containing a list of $terminal $capabillities termcap::=$terminal capabilities. These were in "/etc/termcap" but some are also encoded in a library "$terminfo" file in /usr/lib/terminfo/. terminfo::=/usr/lib/terminfo -- a directory of directories that contain an encoded form of terminal $capabillities. capabillities::= things that a terminal can do like erasing a character or moving the cursor to the left. terminal::hardware=a device that is at the end (terminus) of a piece of wire that leads to a computer. environment::=a set of variable and values that are shared with programs that are loaded by the shell into the program that are used to describe the user's situation. . UNIX Shell and Environment variables export::command, $export_command. variable::=$identifer |$number | .... value::=`a_string_of_characters`. For V:variable, value(`V`) ::string = $`V`. identifier::=`a letter followed by zero or letters and digits`. number::=`one or more decimal digits`. set_shell_variable::= $variable=$expression. set_environment_variable::=`set_shell_variable`; export `variable_name`. export_command::="export" `variable_name`... temporary_variable_for_program::=$variable=$expression `program_name` `arguments`. call_subshell::= ( `commands` ). expression::=$value | $ $variable | 'any_string' | "string_with_wild_cards" | reversed_quote any_command_that_produces_some_output reversed_quote. . UNIX Working Directories HOME::variable=the directory to which you are logged in. CDPATH::variable=used to list directories you wnt to $cd to in the Korn shell. cd::command=change directory. PS1::variable=primary prompt string. PS2::variable=secondary prompt string. . What the UNIX Shell Does - details set::command, sets shell options, $set_shell_options. echo::= echo `item`... << ::redirection, $here_document. set_shell_options::= set -`options`. here_document::= << `end_of_document_sentenel`. USER::=an environment variable nearly always set to the user's login id on login. For variable `V`, $`V` ::=the value of variable with name V. . UNIX Commands Done Quicker erase_word::=$CTRL/U. erase_line::=$CTRL/X. see_line_so_far::=$CTRL/R. CTRL::=indicates that the CTRL is to be held down while the following key is tapped. Bourne_shell_for_loop::=for $variable in $list ; do $commands; done. Bourne_shell_for_each_argument_loop::=for $variable ; do $commands; done. Bourne_shell_while_loop::=while $commands ;do $commands; done. Repeats the loop until one of the first sequence of commands fails. commands::= $command;$command;... list::= a space separated list of words and strings. variable::=any normal shell variable. enter_korn_shell_edit::=ESC For line E, here_document::= $command <<`E` $eol ... $eol `E` $eol. eol::=end of line. list_tail_of_file::=tail -$number_of_lines $file. list_files::=ls -$ls_options. number_of_lines::=any decimal number. file::=a name of a file. ls_options::= a list of letters and digits. search_for_a_pattern_in_some_files::= egrep $pattern $files... pattern::=a description of lines of interest, .See http://www/cs360/notes/26.patterns.html sort::command, the UNIX system sort - fast, general purpose, comprehensive with many posible options and features. sort_and_make_unique::=sort -u. global_substitute_in_vi::= :%s/$pattern/$replaced_by/. replaced_by::=a string. s::$ex_command, substitution. ex_command::=in $vi you can type a colon and then any command of the $ex editor. ex::=the extended UNIX editor. vi::=the visual UNIX editor, actually a visual interface arround $ex. . UNIX Job Control jobs::command, $show_me_my_jobs. show_me_my_jobs::= jobs. job_number::= number listed by the $show_me_my_jobs command in square brackets. $PID is a different number given to a job that is unique to the whole system. Job numbers are unique to the shell running them. fg::command, $run_job_on_my_terminal. bg::command, $run_job_in_the_background. run_job_on_my_terminal::= fg %$job_number. run_job_in_the_background::= bg %$job_number. kill_job::= kill %`job_number`. terminate_job_with_extreme_prejudice::=kill -9 %$job_number. tell_job_that_I_ve_Hung_UP::=kill -HUP %$job_number. kill::command, $send_signal_to_process. kill_command::= $send_signal_to_process. send_signal_to_process::=kill -$signal $process_identifier. PID::=$process_identifier. process_identifier::=number found in the output of ps command in the PID column that uniquely identifies every job running on a system. signal::=number in range 0 to 15 | HUP | QUIT | KILL | TSTP | ... ps::command, $list_my_processes | $list_users_processes |$list_all_processes |... list_my_processes::=ps. list_users_processes(`user_id`)::= ps -u `user_id`. list_all_processes::most_UNIX= ps -elf. list_all_processes::BSD_UNIX= ps aux. vi_writes_automatically::vi_command= :set autowrite `eoln`. stop_background_jobs_on_output::=stty stopped. let_background_jobs_output_on_my_screen::=stty -stopped. . UNIX Redirection redirect_input_to_file::= < `file`. redirect_output_to_file::= > `file`. redirect_output_to_end_of_file::= >> `file`. redirect_input_to_come_from_here::= << `end_of_input_sentinel`. pipe_output_from_one_command_to_input_of_another::= `command1`|`command2`. run_commands_in_a_subshell::= ( `commands` ). run_command_in_background::= `command`&. treat_list_of_commands_as_one_command::= {`commands`}. split_the_output::=tee `filename` | tee -a `filename`. tee::command, split of input into a file and also pass it to the output. null::dev=a virtual device that is always empty and acts as a bottomless sink for unwanted output. the_empty_file::=/dev/null. . UNIX UNIX Filesystems path::= $absolute_path | $relative_path. absolute_path::= / $relative_path. relative_path::= $file_or_directory_name | $directory_name / $relative_path. directory_name::= $this_directory | $parent_directory | $my_home_directory | home_directory(user_name) | $word. this_directory::= "." . parent_directory::= ".." . my_home_directory::= "~" . home_directory(`U`)::= ~`U`. file_or_directory_name::=$word. user_name::= 1..8 alphanumeric characters found as the first field in a line in the /etc/passwd file. word::= any identifier. cd::command, change_directory. change_directory::syntax= cd $path. . UNIX Files wildcard::=a character that in some context indicates a set of possible chracters or strings. zero_or_more_chars::wildcard="*". any_char::wildcard="?". any_one_of::wildcard=[`list of chars and ranges`]. remove_file::=rm `options` `filenames` list_info_about_files::= ls `options` `filenames` grep::command, `Global regular expression print`::=`Search files`. .See http://www.csci.csusb.edu/dick/cs360/notes/27.searches.html list_files_that_have_a_string::= grep -l `string` `files` show_files_andlines_that_have_string_in_them::= grep `string` `files` ls::command, list information about files, $list_files. egrep::command, extended pattern search, $list_files_that_contain_string. list_files::=ls $ls_options $files ls_options::= - $ls_option ... ls_option::= t | r | R | l | F | d | A | a | q | ... t::ls_option=time of last change order r::ls_option=reverse order R::ls_option=recursively down all subdirectories etc l::ls_option=long -- lots of info F::ls_option=Flag executables+directories+symbolic links. a::ls_option=all files and directories including dot-files. q::ls_option=make invisible characters a question mark in listing files::= $empty | $file | $file $file ... file::= `name_of_a_file`| `name_of_a_directory` | `something_with_wildcards` this_process_s_uniqe_identifier::=$$. list_files_that_contain_string::= egrep -l `string` *. . UNIX Find find::command, searches a directory subtree for files and directories meeting more or less complex criteria and processes them in various optional ways, $find_files_under_directory_fitting_conditions. find_files_under_directory_fitting_conditions::=find $directory $condition -print, find_files_under_directory_fitting_conditions_and_do_things::=find $directory $condition $do_things, directory::=any name of a directory or a file name, .See http://www/cs360/notes/14.filesystems.html#path condition ::= $disjunction, disjunction::= $conjunction -o $conjunction..., -o::find_option= or, conjunction::= $primitive_condition ..., -- one or more in sequence. primitive_condition::= \( $disjunction \) | ! $simple_condition, simple_condition::= - $option $arguments_for_option, option::= name | perm | type | user | group | size | inum | atime | mtime | ctime | newer | exec | ok | print. exec_option::find_option= -exec unix_command \;. symbol_for_for_found_file_name::= "{}" end_of_exec_symbol::= \; . UNIX Names, copies, links and files cp::command, $copy_file. mv::command, $move_link. rm::command, $remove_file. ln::command, $make_link_to_a_file. inode::=information node -- the fundamental block of data that is collected together by UNIX to form files. directory::=a file that has a special layout that links file names with inode numbers and other information. copy_file::=cp $copy_options $filename $filename | cp $filename ... $directory_name. copy_options::= $none | $recursive | $force. recursive::= -r. -- on most systems. filename::= normal name of file. filename::=http://www.csci.csusb.edu/dick/cs360/notes/01.intro.html#file_name. directory_name::=name of a file that is a directory. make_link_to_file::command= ln $ln_options $existing_file $newfile | ln $options $existing_file ... $directory_name. existing_file::=$filename. & does exist. newfile::=$filename & does not exist. ln_options::= $none | $symbolic | $force | $symbolic_and_force. symbolic::= -s. force::= -f. Overwrite existing with out complaint or warning. symbolic_and_force::= -sf. remove_link_to_file::= rm $filename ... | rm -i $filename ... | rm -r $filename ... | ... . .See http://www/cs360/notes/23.delete.html#Definitions move_link::= mv $move_options $filename $newfilename | ... -- actually a the result of linking to new and removing the old! move_options::=$force|$none. tar::command, $tape_archive_processor tape_archive_processor::= $create_archive | $extract_from_archive | ... create_archive ::= tar cf $filename $directory_name. extract_from_archive::= tar xf $filename $directory_name | $verbose_extract. verbose_extract::= tar xvf $filename $directory_name. none::options= nothing, nada, leave blank, null, empty string, ... . UNIX Security and Privacy ls::command=list files command. .See list_ownerships_etc chmod::command=change permitted modes for a file. .See change_permissions umask::command=$set_default_permissions. list_ownerships_etc::=ls -l $files. set_default_permissions::=umask $three_octal_digits. three_octal_digits::=$octal_digit $octal_digit $octal_digit. change_permissions::= chmod $new_mode $files. new_mode::=$three_octal_digits | $who $op $what, who::= `optional u` `optional g` `optional o` | a op::= + | - | =. what::=`any number of` r w x X s t. octal_digit::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7. files::=a list of file names separated by white spaces - often the result of wildcard expansion. setuid::=set user identity. setgid::=set group identity. . Deleting things in UNIX .As_is trash files... rm::command=$remove_some_files | $remove_files | $remove_a_directory_tree. rmdir::command=$remove_empty_directories. mv::command=$put_things_in_a_trashcan | ... . find::command=$find_all_trashcans | ... . .See http://www/cs360/notes/17.finding.html remove_files::= rm $list_of_files. remove_some_files::= rm -i $files. remove_a_directory_tree::=rm -r $directories. remove_empty_directories::=rmdir $directories. put_things_in_a_trashcan::=mv $files .trashcan. find_all_trashcans::=find . -name .trashcan -print. files::=list of one or more file name separated by spaces. -- can be generated by a wild card. df::command=disk_free. du::command=disk_usage. . Showing what is inside a file on UNIX more::command, $see_one_screen_at_a_time. less::command, $see_one_screen_at_a_time. pg::command, $see_one_screen_at_a_time. cat::command::, $concatenate_files. od::command, $octal_dump | $hexadecimal_dump | $character_dump. file::command, $find_out_type_of_data_in_files. sed::command, $edit_a_stream_of_lines. tail::command, $look_at_the_end_of_a_file. see_one_screen_at_a_time::= more $files | less $files | pg $files. concatenate_files::=cat $files | cat -$cat_options $files. cat_options::= v | n | t | ... make_non_printing_visible::$cat_options= v. number_the_lines::$cat_options= n. octal_dump::=od $files. hexadecimal_dump::=od -x $files. character_dump::=od -c $files. find_out_type_of_data_in_files::= file $files. edit_a_stream_of_lines::= sed. look_at_the_end_of_a_file::= tail $file | tail $tail_options $files. tail_options::= +$number_lines_skipped | -$number_of_lines_shown ... reversed::tail_options= r. watch_a_file_grow::tail_options= f. number_of_lines_skipped::=any decimal number. number_of_lines_shown::=any decimal number. files::=list of one or mire filenamess separated by white space. file::=name of a file . Regular Expressions . UNIX For Programmers .Open Syntax . UNIX Commands vi::command, visual $editor. ed::command, the original $editor. ex::command. the extended $editor. command mode in vi as well. grep::command. short for g/$RE/p in $ed. $search_program. egrep::coomand. An extended grep -- more options and often faster. $search_program. fgrep::command. Fixed grep - search for strings with no $magic. $search_program. expr::command. Can be used to test to see if an argument matches a pattern in a shell script: .See http://www/cs360/notes/45.scripts.html#expr find_lines_in_file::= $search_program `options` $pattern $files. search_program::= grep | egrep | agrep. find_lines_with strings_in_files::= fgrep `options` `string` $files. Start_edit_at_line_with_string::= vi +/"$pattern" $file | ex +/"$pattern" $file. grep_options::= -v | -w | -i | -l | -c | `any combination` | `...` magic::=having $RE in searches in an editor. editor::= vi | view | ed | ex | edit. call_an_editor_to_crete_or_change_a_file::= $editor $filename. . Searching in UNIX editors search_forward::= /$pattern/ search_backwards::=?$pattern? . Global commands in ed/ex in UNIX do_it_to_all_lines_that_match::= g/$pattern/$ed_command. ed_command::=delete | insert | move | substitute | join | read | write | ... ex_command::=just like ed ony more of them. . Global commands in vi do_it_to_all_lines_that_match_in_vi::= :g/$pattern/$ex_command. Symbols_used_in_patterns::=following .Set caret::= ^, $start_of_line_anchor. dollar::=$, $end_of_line_anchor. square_brackets::= [ | ]. $set_of_characters. period::= . , $any_character. asterisk::= *, $any_number_of_the_previous. bar::= |, $or. question_mark::= ?, $option_symbol. plus::= +, $one_or_more_of_the_previous. braces::= { | }, $n_thru_m_repetitions $n_repetitions back_slash::= \\. $escape_next_symbol $start_of_a_word $end_of_a_word .Close.Set . Patterns in UNIX pattern::= optional($start_of_line_anchor) main_pattern optional($end_of_line_anchor). main_pattern::=any_number( ($any_char | $set_of_chars | normal_char | escaped_char) optional($any_number_of_the_previous))). start_of_line_anchor::= ^ end_of_line_anchor::= $ set_of_characters::= [ `#( character | character` - `character )` ]. any_character::= . any_number_of_the_previous::= * . Regular Expressions RE::=regular_expression. regular_expression::=`a regular expression use sequence+selection+iteration to express a set of possibillities`. REs::=`plural of $RE` . Extended REs for egrep or::= | option::= ? one_or_more_of_the_previous::= + n_thru_m_repetitions::= \{ `n`, `m` \} n_repetitions::= \{ `n` \} . REs in ex/vi start_of_a_word::= \< end_of_a_word::= \> .Close Syntax grep::command, global regular expression print. egrep::command, extended $grep. agrep::command. Arizona grep. fgrep::command, fixed string grep. . Comparing UNIX Files make::command, automates compilation, linking, and other repeitive processes, $$make_something. diff::command, $find_differences_between_2_files, $apply_a_delta_file. ex::command. Calls the extended editor. $use_a_delta_file. make_something::=make $something. something::=$filename... . filename::=http://www.csci.csusb.edu/dick/cs360/notes/01.intro.html#file_name. makefile::= $how_to_make_something ... how_to_make_something::= $target:$sources $actions_that_make_target_from_sources... $eoln. actions_that_make_target_from_sources::= $eoln $tab $command. eoln::=end_of_line. tab::=a real tab character... spaces will not work. find_differences_between_2_files::=diff $options $filename $filename. diff_options::= $none | -e make_a_delta_file::= diff -e $oldfile $newfile >$deltafile. apply_a_delta_file::=ex - $oldfile <$deltafile. oldfile::=$filename. newfile::=$filename. delatafile::=$filename. cmp::command. bytewise_comparison::= cmp $filename $filename. comm::command. compare_alphabetical_lists::=comm $comm_options $filename $filename. comm_options::= - ( 1 | 2 | 3 | 12 | 13 | 23 ). . Why use a program to compare files .Set Paris in the the Spring. .Close.Set . UNIX text handling tools .As_is ~dick/bin/prep .As_is ~dick/bin/concordance .As_is ~dick/bin/textanal .As_is ~dick/bin/prep . Extra on some system .As_is diction name_of_your_text_file spell::command. Outputs words from input that aren't in the dictionary. ispell::freeware. Interactive spell checker. wc::=$word_count_etc. word_count_etc::= $count_everything | $count_line | $count_words | $count_characters. count_everything::= wc $filenames... count_words::= wc -l $filenames... count_lines::= wc -w $filenames... count_characters::= wc -c $filenames... filenames::=list of names of existing files searated by spaces. .Open Vi Tips and techniques . Beginners start here .See List of Vi Commands .As_is :w Write this file .As_is :n Next file .As_is :e Edit file .As_is :e# Edit the other file .As_is :e!# Edit the other file and forget my changes to this file .As_is cut "cd .As_is copy "cy .As_is paste "cp pastes after cursor .As_is paste "cP pastes before cursor .As_is .exrc .As_is ex the extended editor that vi is an interface to .As_is rc read commands .As_is !}br word wrap paragraph(CSUSB only) .As_is !Gsort|uniq -c|sort -nr list and count words in file .As_is !4!spellu spell check 4 lines .As_is !'astats work out statistics... .As_is :!generate_index_file >index.html & .As_is :ab .Open Syntax of Vi commands . Notation c::=character. ctrl(`k`)::=`tapping the k key with the Control shift held down`. dot::= . period::= . eoln::=`tap the Return or Enter key` $eoln= End-of line. esc::=`the Esc character` letter::="a".."z" | "A".."Z". n::=decimal_number. text::=`any series of characters with no Esc in it unless prefixed by a $ctrl V`. SP::=space. BS::=Back_space. . List of Vi Commands vi_repeat_command_n_times::= `$n` `$vi_command`, vi_append_after::= a. vi_add_after_end_of_line::=A. vi_move_back_a_word::=b. vi_move_back_a_big_word::=B. vi_change_something::= c `$movement` `$replacement_text` `$esc` vi_change_rest_of_line::= C `$replacement_text` `$esc` vi_change_one_line::= cc `$replacement_text` `$esc`. vi_change_n_lines::= c `$n` c `$replacement_text` `$esc`. replace_ment_text::=`$text`. vi_cut_command::= double_quote `$buffer_id` vi_delete_something, vi_delete_something::= d `$movement`. .See vi_delete_character vi_delete_rest_of_line::=D. vi_delete_whole_line::= dd. vi_delete_n_lines::= d `$n` d. vi_move_to_end_of_word::=e. vi_move_to_end_of_big_word::=E. vi_move_to_find_char_in_line::= f `$c`. vi_move_to_find_previous_char_in_line::= F `$c`. vi_go_forward_a_screen::= `$ctrl/F`, vi_move_forward::=`$ctrl/F`, vi_go_to_line_n::= `$n` G vi_move_to_line::= `$n` G vi_go_to_last_line::= G, vi_move_to_last_line::= G, vi_give_me_information_on_this_file::=`$ctrl/G` | :f `$eoln` vi_move_back_a_space::= h | `$BS`. vi_insert_text::= i `$inserted_text` `$esc`. inserted_text::=text. vi_insert_a_start_of_line::= I `$inserted_text` `$esc`. vi_move_down::=j vi_move_to_start_of_text_on_next_line::=`$eoln`| + . vi_join_lines::=J. vi_move_up::=k. vi_move_up_to_start_of_text_on_previous_line::= -. vi_move_forward::= l | `$SP`. vi_mark_this_point::= m `$letter`. vi_move_to_next_string::=n. vi_move_to_next_string_backwards::=N. vi_open_line_below::=o `$inserted_text` `$esc`. vi_open_line_above::=O`$inserted_text` `$esc`. vi_paste_last_delete_after::=p. vi_paste_last_delete_before::=P. vi_paste_buffer::=`$double_quote` `$buffer_id` (p | P). vi_paste_last_but_n_delete::=double_quote `$n` (p|P). vi_quit_visual::=Q. vi_replace_a_char::= r `$c` vi_replace_string::= R `$text` `$esc`. vi_substitutes::=s `$something` vi_move_to_char::=t `$c`. vi_move_to_char_backwards::=T `$c`. vi_undo::=u. vi_Big_undo::=U. vi_undo_everything::= :e! `$eoln`. vi_redo::= `$dot` . vi_move_over_word::=w. vi_move_over_big_word::=W. vi_delete_char::=vi_cross_out|vi_cross_out_previous. vi_cross_out::=x. vi_cross_out_previous::=X yank::=copY. copY_into_buffer::= `$double_quote` `$buffer_id` vi_copy_command, buffer_id::= `$letter` vi_copY_something::= y `$movement`. vi_copY_line::=yy. vi_go_to_sleep::=ZZ vi_line_commands::= : ex_command. vi_quit_and_no_save::= q! vi_search_forward::= / `$vi_regular_expression`, vi_search_backward::= ? `$vi_regular_expression`, .See http://www/cs360/notes/26.patterns.html vi_shift_line_left::= <<, vi_shift_line_right::= >>, vi_shift_n_lines_left::= <`$n`<, vi_shift_n_lines_right::= >`$n`>, vi_shift_something_left::= <`$movement`, vi_shift_something_right::= >`$movement`, vi_shell_escape::= vi_pipe_thru | ex_shell_escape, vi_pipe_thru::= vi_pipe_line | vi_pipe_n_lines | vi_pipe_something, ex_shell_escape::= :! `shell_command`, vi_pipe_line::= !!, vi_pipe_n_lines::=!`$n`!, vi_pipe_something::= ! `$movement`. vi_go_to_column_n::= `$n` `$vertical_bar`, vi_go_to_first_column::=0. vi_go_to_first_nonwhitespace::= ^ vi_go_to_last_char_in_line::= $. vi_move_to_column_n::= `$n` `$vertical_bar`, vi_move_to_end_of_paragraph::= }. vi_move_to_first_column::=0. vi_move_to_first_non_whitespace::= ^ vi_move_to_last_column::=$. vi_move_to_marked_character::=` vi_move_to_marked_line::=' vi_move_to_matching_parenthesis::=%. vi_move_to_start_of_paragraph::= {. vi_word_wrap_the_whole_file::= 1G!Gbr `$eoln`. movement::= `any number followed by any vi command with "move" in above list`, movement::=$n $single_movement. single_movement::= h | j |k | l | + | - | F`$c`|f`$c`|t`$c`|T`$c` G | `$SP` | `$BS` | { | } |.... c::=`any character` . The Vi Alphabet vi_command::=many including the following .Set A:: $vi_command, $vi_add_after_end_of_line. a:: $vi_command, $vi_append_after. B:: $vi_command, $vi_move_back_a_big_word. b:: $vi_command, $vi_move_back_a_word. C:: $vi_command, $vi_change_rest_of_line. c:: $vi_command, $vi_change_something. D:: $vi_command, $vi_delete_rest_of_line. d:: $vi_command, $vi_delete_something. E:: $vi_command, $vi_move_to_end_of_big_word. e:: $vi_command, $vi_move_to_end_of_word. f:: $vi_command, $vi_move_to_find_char_in_line. F:: $vi_command, $vi_move_to_find_previous_char_in_line. G:: $vi_command, $vi_go_to_line_n. h:: $vi_command, $vi_move_back_a_space. I:: $vi_command, $vi_insert_a_start_of_line. i:: $vi_command, $vi_insert_text. J:: $vi_command, $vi_join_lines. j:: $vi_command, $vi_move_down. k:: $vi_command, $vi_move_up. l:: $vi_command, $vi_move_forward. m:: $vi_command, $vi_mark_this_point. n:: $vi_command, $vi_move_to_next_string. N:: $vi_command, $vi_move_to_next_string_backwards. O:: $vi_command, $vi_open_line_above. o:: $vi_command, $vi_open_line_below. p:: $vi_command, $vi_paste_last_delete_after. P:: $vi_command, $vi_paste_last_delete_before. Q:: $vi_command, $vi_quit_visual. r:: $vi_command, $vi_replace_a_char. R:: $vi_command, $vi_replace_string. s:: $vi_command, $vi_substitutes. t:: $vi_command, $vi_move_to_char. T:: $vi_command, $vi_move_to_char_backwards. U:: $vi_command, $vi_Big_undo. u:: $vi_command, $vi_undo. W:: $vi_command, $vi_move_over_big_word. w:: $vi_command, $vi_move_over_word. x:: $vi_command, $vi_cross_out. X:: $vi_command, $vi_cross_out_previous. y:: $vi_command, $vi_copY_something. ZZ:: $vi_command, $vi_go_to_sleep. .Close.Set . Some vi Line mode/ex commands ex_command::= `$address` `$action`, ex_actions::=following .Set a::ex_command, append upto line with a single . on it d::ex_command, delete e::ex_command, edit file f::ex_command, which file name? i::ex_command, insert before the line j::ex_command, join lines l::ex_command, list (show tabs and eolines) m::ex_command, move lines q::ex_command, quit r::ex_command, read file in s::ex_command, Substitute: s/old_pattern/new_string/flags u::ex_command, Undo vis::ex_command, Visual mode w::ex_command, Write file .Close.Set .See http://www/cs360/notes/33.ed+ex.html address::= `$range` | `$line` | `$global` | `$all_lines`, all_lines::=%. this_file::= %. range::= `$line`,`$line`, global::= g `$search`, v`$search`, line::=`$search` | `$n` | `$place` ( + | - ) `$n` | `$search` (+|-) `$n`, place::= `$here` | `$end_of_file`, here::= `$dot` end_of_file::= $ search::= $forwards|$backwards forwards::= / `$pattern` /, backwards::= ? `$pattern` ?, ex_substitute_command::=`$address`s/`$pattern`/`$replacement`/`$flags`, pattern::= .See http://www.csci.csusb.edu/dick/cs360/notes/26.patterns.html replacement::=`string with & and \1,\2,\3,... replaced` flag::= `any_number_of`( c | g | p ), -- confirm, global, print. .Close Syntax map::$vi_ex_command, defines map from keys to commands. unmap::$vi_ex_command, removes meaning of key. map_key_to_command::=map $key $commands. key::= a single key. prefix some control characters with CTRL/V. commands::=any sequence of vi commands, but prefix some control characters with CTRL/V. vi_ex_command::=in vi command mode tap the colon(:) key before the command and tap the return after the end. .Close EMACS::=Editing Macros. EMACS_command::= $addresses $action. action::=following .Set a::$action, $append. c::$action, $change. d::$action, $delete. i::$action, $insert. m::$action, $move. p::$action, $print. q::$action, $quit. r::$action, $read. s::$action, $substitute. t::$action, $copy. w::$action, $write. Plus some multiple charcter commands .Close.Set addresses::= $empty | $address | $address, $address | $whole_file_indicator | $global_edit. global_edit::= g/ $pattern /. address::= $simple_address | $relative_address | $simple_address $plus_or_minus $number. relative_address::= + $number | - $number | + | - . simple_address::= $before_top | $last_line | $current_line | $marked_line | $next_line_to_match | $previous_line_to_match. before_top::= 0. last_line::= $. current_line::= $period. marked_line::= ' $letter. next_line_to_match::= / $pattern /. previous_line_to_match::= ? $pattern ?. whole_file_indicator::= % normal_string_delimeter::= /. . UNIX Edit Actions and Symbols append::= a $lines. change::= c $lines. delete::= d. edit::= e $force_it_option $other_file_symbol | e $force_it_option $file_name. other_file_symbol::= #. insert::= i $lines. move::= m $address. print::= p. quit::= q. read::= r $source. source::= $file_name | ! unix_command. substitute::= s / $old_string / $new_string / $flags. flags::= any of g(global) + c(confirm) + p(print result). old_string::=$pattern | $empty. new_string::=any string of characters but escape special chars like & and /. write::= w $force_it_option $append_it_option $destination_option. force_it_option::= $empty | ! . append_it_option::= $empty | >>. destination_option::= $empty | $file_name. Symbols::=following .Set dollar::=$::ed_symbol, $last_line. percent::=%::ex_symbol, $whole_file_indicator. plus::= + ::ex_symbol, $relative_address. minus::= - ::ex_symbol, $relative_address. single_quote::='::ex_symbol, $marked_line. period::=.::ed_symbol, $current_line. g::ed_symbol, $global_edit. slash::=/::ed_symbol, search for $next_line_to_match and $normal_string_delimeter. question_mark::=?::ed_symbol, search for $previous_line_to_match. exclamation_mark::=!::ed_symbol, $force_it_option. .Close.Set letter::= a..z. period::= .. empty::=. TBA::=To Be Answered. . Awk -- Ultimate UNIX Tool . Stream Editting on UNIX sed::command, $edit_every_line_input, $edit_every_line_in_files. edit_every_line_input::= sed $sed_options $sed_commands edit_every_line_in files::= sed $sed_options $sed_commands $files files::=one or more files. sed_options::= $empty | -n, Use -n when no printing is assumed. sed_commands::= -f $filename | $sed_command, -- ussually need to put it in quotes! sed_command::= $address $action. action::=$print | $substitute | $delete | $add | $input | $quit | ... address::=http://www/cs360/notes/33.ed+ex.html$address. print::= p substitute::= s/old/new/ $substitute_options substitute_options::= $print_option $global_option $confirm_option. print_option::=p. confirm_option::=c. delete::=d. add::= s $lines. input::= i $lines. quit::= q. lines::= sequence of lines terminated by one that has a period and nothing else on it. symbolic_sed_commands::=following .Set a::$action, $add. d::$action, $delete. i::$action, $insert. p::$action, $print. q::$action, $quit. s::$action, $substitute. Etc... .Close.Set . UNIX File slicing and Dicing commands tr::command, $translate_input_characters. uniq::command, $select_unique_lines. join::command, $relational_join paste::command, $paste_files_together_line_by_line. pr::command, $prepare_for_printout. cut::command, $cut_up_input_lines. translate_input_characters::= tr $tr_options $input_chars $output_chars. tr_options::= $none | - $some_of( c | s | d ). prepare_for_printout::= pr $pr_options $files. pr_options::= $none | $some_of( $merge | $columns | $title | ... ) merge::= -m. column::= -$n. title::= -t ( $none | $string ). cut_up_input_lines::= cut $cut_options $files. cut_options::= $by_column | $by_field. by_column::= -c $some_of( $n | $n-$n | $comma ) by_field::= $delimiter -f $some_of( $n | $n-$n | $comma ). delimiter::= $default | -d$char. default::=$none. paste_files_together_line_by_line::= paste $paste_options ( $files | $dashes). paste_options::= $delimiter | -s. relational_join::= join $join_options $files. select_unique_lines::= uniq $uniq_options $files. uniq_options::= $count $dups_once $only_uniq $ignore_fields $ignore_chars, count::= -c, dups_once::= -d, only_uniq::= -u, ignore_fields::= - $n. ignore_chars::= + $n. n::=decimal number. some_of(X)::=take one of each option from list as many timess as you want and concatenate. string::= a word or title string in quotations. none::= . . Sorting data on UNIX sort::command, see $sort_a_file and $sort_standard_input. sort_a_file::= sort $sort_options -o $filename $filename. sort_standard_input::=sort $sort_options. output_sorted_data_from_files::= sort $sort_options $filenames. sort_options::=following .Set +$n start sort key in firled `n` +$n.$m start sort key at char `m` of field `n`. -$n stop sort key in firled `n` -$n.$m stop sort key at char `m` of field `n`. -t The `tab` or field delimiter. -n Sort numerically -f Fold capitals and lowercase together. -r Reverse sort from ascending to descending -b Ignore leading blanks -u Remove duplicates (like uniq but better) .Close.Set filenames::=$one_or_more_of($filename). . Controling processes in UNIX nohup::command, $dont_kill_this_when_I_log_out dont_kill_this_when_I_log_out::=nohup $command & signal::=one of 15 or more numbered messages that can be sent from one running process to another on a UNIX machine, See the following list: .Box STOP::$signal=17. HUP::$signal=1, The modem just Hung Up. INT::$signal=2, Interupt QUIT::$signal=3, Stop and dump core. KILL::$signal=9, terminate with extreme prejudice(BSD Manuals:-) TERM::$signal=15, Terminate but gracefully. STOP::$signal=17, stops process until the next $CONT or other $signal. CONT::$signal=19, continue after a $STOP. TSTP::$signal=18, stop and be ready to become foreground or background. list_all_signals_on_this_system::= kill -l .Close.Box kill::command. $send_signal_to_process, $list_all_signals_on_this_system. send_signal_to_process::= kill -$signal $process_ids process_ids::= $process_id ... process_id::=a unique decimal number allocated to every running process on a UNIX system. ps::command, $list_my_processes, $list_all_processes list_my_processes::=ps. list_users_processes::$SYSV= ps -u `user_name`. list_users_processes::$BSD= ps aux|grep `user_name`. list_all_processes::$BSD= ps aux. list_all_processes::=$SYSV= ps -elf trap::command. $do_something_when_you_get_any_of_these_signals. do_something_when_you_get_any_of_these_signals::= trap $signals "$command". command::=any UNIX command. signals::=$signal $signal ... ampersand::=&. In UNIX shells an ampresand is put after a command that should be run ind parallel with the net command - typically in the back ground of the users login shell. SYSV::=AT&T flavored UNIXen. BSD::=Berkely flavored UNIXen. . Timing things in UNIX time::$command, $time_this, time_this::= time $command $arguments_etc. command::=any UNIX executable arguments_etc::= list of words and redirections separated by blanks nice::$command, $let_the_other_person_go_first. let_the_other_person_go_first::= nice $command $arguments_etc. uptime::$command. outputs stats about loads etc... w::$command, outputs $uptime and then lists what people are doing. list_load_and_what_people_are_doing::= w. . Sleeping and waiting in UNIX sleep::command, $wait_roughly_this_number_of_seconds. wait_roughly_this_number_of_seconds::= sleep $n. n::=any whole decimal number. . Setting up a terminal for old fashioned UNIX stty::command, $check_terminal_settings, $read_the_stty_manual, .See http://www/cs360/notes/05.terminals.html man::command, to brouse thought the online manuals. check_terminal_settings::= stty | stty -a | stty -everything. read_the_stty_manual::=man stty. tty::=teletype, an ancient but cheap terminal used on the First World Wide electronic network: Telex. ptty::=Pseudo-$tty used on Xwindows. . People and UNIX Understand the problem area: Get Tools: Understand the particular problem in front of you. Act: Check: Learn: SNAFU::= Situation Normal: All $Fouled Up. A phrase invented by the US FUBAR::= $Fouled Up Beyond All Recognition. Fouled::=the GIs used a word in place of Fouled with a similar meaning but a stronger emphasis... . Formating data on UNIX pr::command, $prepare_to_print. banner::command, $make_a_banner. make_a_banner::= banner $words. prepare_to_print::= pr $pr-options $files pr_options::= $pr_number_of_cols | $pr_no_title | $pr_header | $pr_merge_files |... pr_number_of_cols::= -$n. pr_no_title::= -t. pr_header::= -h $string. pr_merge_files::= -m. display_files_with_headers::= head -10000 $files n::=any whole number in decimal. string::=any string - but put it in quotes. words::= some words inside quotes. width::=a decimal number between 10 and 250. . br - Break Lines Up (CSUSB only) br::a_local_command, $break_long_lines. break_long_lines::= br $width. THis is a program I wrote and installed on most of the UNIXen that I administered -- or just compiled into my local ~/bin directory... Very useful and guarantee'd correct Shell commands .As_is br .As_is br outfile Used inside $vi. .As_is !!br word wrap this line .As_is !Gbr word wrap rest of file .As_is 1G!Gbr 40 word wrap whole file to 40 characters .As_is ~|br .See http://www/dick/tools/br.l (manual) .See http://www/dick/tools/br.l.cat (printable manual) .See http://www/dick/tools/br.c .See http://www/dick/tools/brt.c (Source code -- K&R C) .See http://www/dick/tools/br.c (ANSI C) .See http://www/dick/samples/br.d.html (documentation). . Writing Scripts for UNIX .As_is chmod a+rx name_of_file .As_is : comment .As_is command arg1 arg2 arg3 ... .As_is $0 is command .As_is $1 is arg1 .As_is $2 is arg2 .As_is ... .As_is case $# in .As_is 0) echo Usage: $0 ..... ; exit 1;; .As_is 1) file=$1; do_something_to_file .As_is ;; .As_is *) for file; do $0 $file; done ;; .See http://www/cs360/notes/unix.syntax.html command_line_argument::= $`n`. remove_first_argument_etc::= shift. number_of_command_line_arguments::= $#. exit_status_of_last_command::= $?. all_arguments::= $*. all_arguments_in_quotes::="$@". this_process_s_id::=$$. test_for_some_condition::= $test_command | [ $test_options ] | $test_string_for_a_pattern. test_string_for_a_pattern::=http://www/cs360/notes/45.scripts.html#test_string_for_a_pattern. test_command::= test $test_options. test_exprression::=$test_options. test_options::= $test_option | $test_option $space $test_boolean_operator $space $test_options | $not $space $test_option. not::= !. space::=mandatory spaces or tab characters. test_option::= $value $space -$fortran_comparison $space $value | -$file_state $file | $string $string_comparison $string. file_state::= $r | $s | $z | $d | ... .As_is if test -r .profile; then echo .profile exists.; fi .Box r::$file_state=readable. d::$file_state=directory. s::$file_state=readable and nonempty. z::$file_state=readable and empty. ...(depending on your system) .As_is man test .Close.Box file::=possible name of a file -- string of letters and digits variable .... value::= `any_valid_shell_argument`. fortran_comparison::= $lt | $le | $eq | $ne | $gt | $ge. .As_is if test $# -eq 3; then echo Command has three arguments; fi .Box lt::$fortran_comparison=less than, ge::$fortran_comparison=greater than or equal, ne::$fortran_comparison=not equal to, eq::$fortran_comparison=is equal to, le::$fortran_comparison=is lessthan or equal to, ge::$fortran_comparison=is lessthan or equal to. .Close.Box string_comparison::=$test_strings_equal | $test_strings_not_equal. test_strings_egual::= =. test_strings_unequal::= !=. string::=x`any sequence of words and arguments and variable values in quotes`. test_boolean_operator::= $test_and | $test_or. test_and::= -a. test_or::= -o. output_result_of_expression::= expr $expression. put_output_of_expresion_in_command::= $reverse_quote expr $expression $reverse_quote. test_string_for_a_pattern::= expr $expression : $expr_pattern >/dev/null, .As_is if expr $1 : "-" ; then # first argument starts with a dash. reverse_quote::="`". expr_command::=exor $expression. expression::= $element | $expression $expr_operator $expression ... . expr_operator::= + | - | \* | / | % | = | != | > | >= | < | <= | $vertical_bar | $ampersand | $colon_operator. colon_operator::$expr_operator. Matches its first string argument against a $expr_pattern in the second argument. expr_pattern::=a pattern with wild cards for characters + repetition with * and the ability to select a part of the pattern "\(....\)". Warning the pattern is always anchored at the start of the string. .See http://www/dick/cs320/notes/26.patterns.html element::= $string | $constant | \( $expression \). ampersand::= "&". vertical_bar::= "|". string::=any string in double or single quotes with usual shell rules, of constant::=$number | $word. number::= sequence of decimal digits. word::=sequence of words and values of variables with no whitespace... . How to Appear Organized using UNIX: Calendars .As_is In vi Command mode :!cal .As_is In vi Input mode :!cal .As_is Input it into text while .As_is in vi command mode .As_is on a blank line !!cal .As_is In ex !cal .As_is Sending mail with mailx ~!cal .As_is Reading mail with mailx !cal .As_is On the WWW with Lynx !cal (and then CTRL/D) . Using UNIX commands inside other programs vi_command_shell_escape::= :! `shell_command`. ex_command_shell_escape::= ! `shell_command`. mailx_command_shell_escape::= ! `shell_command`. lynx_command_shell_escape::= ! `shell_command`. sending_mailx_shell_escape::= ~! `shell_command`. vi_command_shell_escape::= :! `shell_command`. daemon::=`a program that runs without a user invoking it at a terminal`. . UNIX Script expressions $TBA . Miscelaneous UNIX Commands .See http://www.ccil.org/jargon/jargon.html who::command, lists users, $RTFM script::command, records what happens in a file. RTFM::=Read the Famous Manual... See $man