Stty Erase ‘^?’ Or Stty Erase ‘^H’  Depending Upon Your Terminal, You May Need to Type Stty Erase and Press Backspace Key, and Type Stty Erase ‘^H’ and Press Ctrl+H

Total Page:16

File Type:pdf, Size:1020Kb

Stty Erase ‘^?’ Or Stty Erase ‘^H’  Depending Upon Your Terminal, You May Need to Type Stty Erase and Press Backspace Key, and Type Stty Erase ‘^H’ and Press Ctrl+H Working with Your Shell Shell as Command Processor: An Introduction Shell allows you to access Linux Bourne family (/bin/sh, /bin/ksh, /bin/bash, /bin/zsh) or C Shell family (/bin/csh, /bin/tcsh) with zsh and bash are commonly used. Shell for customizing the environment Shell acts as an interface between the kernel and the application programs or user commands. A typical shell command execution: “ls –l –t note2 note2”, where ls is the command, ‐l and ‐t are options, all ‐l, ‐t, note1, and note2 are called arguments. Why UNIX Commands Are Noninteractive ? A command may take input from the output of another command. May be scheduled to run at specific times. User input can also be provided through command line arguments. Command arguments need not be known in advance. Allows designing of applications that determine their own behavior by reading configuration files. The Shells (1/2) Shell supports job control, aliases, and history. It is both an interpreter and a scripting language. When you login, an interactive shell presents a prompt and waits for your requests. In fact, an interactive shell runs a noninteractive shell when executing a shell script. Bourne shell was developed by Steve Bourne. C shell was created by Bill Joy at Berkeley. For some time, people use C shell for interactive jobs, while use Bourne shell for programming. The Shells (2/2) Shell variables are of two types: local and environment. PATH, HOME, and SHELL are examples of environment variables. They are available in user’s total environment. Local variable can be defined as: $ DOWNLOAD_DIR=/home/romeo/download The set (a shell builtin) statement displays all variables in the current shell, but the env (an external) command displays only environment variables. We can use export to implement variable inheritance. Export simply converts a local variable to an environment variable. (C shell uses setenv) Common Environment Variables Variable Significance HOME Home directory PATH List of directories searched by shell to local a command LOGNAME Login name of user USER As above MAIL Absolute pathname of user’s mailbox file MAILCHECK Mail checking interval for incoming mail MAILPATH List of mailboxes checked by shell for arrival of mail TERM Type of terminal PWD Absolute pathname of current directory (Korn and Bash only) CDPATH List of directories searched by cd when used nonabsolutely PS1 Primary prompt string PS2 Secondary prompt string SHELL User’s login shell and one invoked by programs having shell escapes Comments on Shell Variables $ PS1 = “C>” C>_ $ PS1=‘[$PWD] ’ [/home/romeo] cd /etc [/etc] _ Bash stores all previous commands in the file $HOME/.bash_history. You can use HISTFILE to assign a different filename. $ cd $HOME/foo has the same effect as $ cd ~/foo The shell executes a profile on login and an rc file when creating a sub‐shell. Example of /bin/csh example‐isp> echo $SHELL /bin/csh example‐isp> finger ejray Login name: ejray In real life: "RayComm" Directory: /home/users/e/ejray Shell: bin/csh On since Jul 23 06:58:48 on pts/16 from calvin.raycomm.com 1 minute 28 seconds Idle Time No unread mail No Plan. example‐isp> Example of /bin/bash [ejr@hobbes ejr]$ echo $SHELL /bin/bash [ejr@hobbes ejr]$ finger ejr Login: ejr Name: Eric J. Ray Directory: /home/ejr Shell: /bin/bash On since Wed Jul 22 07:42 (MDT) on tty1 3 hours 15 minutes idle On since Thu Jul 23 08:17 (MDT) on ttyp0 from calvin No mail. Project: Working on UNIX VQS. Plan: This is my plan‐work all day, sleep all night. [ejr@hobbes ejr]$ Available Shells and Making a Change [ejr@hobbes ejr]$ cat /etc/shells /bin/bash /bin/sh /bin/tcsh /bin/csh /bin/zsh [ejr@hobbes ejr]$ chsh Changing shell for ejr. Password: New shell [/bin/bash]: /bin/zsh Shell changed. ejr@hobbes ~ $ ejr@hobbes ~ $ su ‐ ejr Password: ejr@hobbes ~ $ Note: You may also type shell name to change shell. To exit a shell: type exit or Ctrl+Delete Types of Shell Commands External program on disk which could be – a binary executable (written in C, C++). – a script file (like a shell or perl script). Internal command of the shell which could be – a builtin (like cd, pwd, etc.) – an alias defined by the user that invokes the disk or internal version in a specific manner. Basic Shell Commands Using SHELL environment variable, e.g. > echo $SHELL Using finger userid, e.g. > finger sjkao Seeing which shell are available, e.g. cat /etc/shells Changing shell with chsh, e.g. > chsh or > /bin/zsh Exiting from a temporary subshell, e.g. > exit or crtl + delete Completion in bash and zsh, using tab key Viewing screen history, using keys:↑, ↓,←,→ Changing identity with su, or su – userid Fixing terminal settings with stty or reset The PATH A shell variable (or environment variable) that specifies a list of directories to search. Shell looks at PATH only when command is not used with a pathname and is also not a shell builtin. Command can still be executed if not in PATH by – Using a pathname. – Modifying PATH to include the directory containing the command. PATH can be modified in an absolute or relative manner: PATH=/usr/bin:. (Absolute) PATH=$PATH:/usr/local/bin (Relative) Modified setting is lost after user has logged out unless saved in a startup file. How the Shell Determines the Command to Run If command is invoked with a pathname (like /bin/echo), the shell runs program at the specified location. If command is invoked without a pathname, the shell first checks whether it is an alias or builtin: If alias or builtin, the shell runs it without looking in disk. If not, the shell looks at the PATH variable for directories where the command may reside. Flexibility of Command Usage Run multiple commands in the same line: for example, $ date ; echo $PATH Split a command into multiple lines: $ echo “Hello [Enter] > Dolly” [Enter] Save command output in a file (redirect): date > foo Use output of one command as input of another (pipe): date | cut ‐d” “ ‐f2 Run a command in the background with &: ls ‐lRa / > $HOME/ls‐lRa.txt & Command Classification: A Different Approach Utilities that are generally used in standalone mode (vi, stty, bc). Commands that do useful work but produce no output (mkdir, cp, rm). Commands that produce output which may need further processing (date, who, ls). Commands specially designed to accept output of other commands as their input and vice versa (grep, sort, head). The Wild Cards * Any number of characters, including none ? A single character [x‐z] A single character within the range a‐z {pat1, pat2, …} Match the patterns pat1, pat2, .. [!a‐z] A single character that is not within !(flname) All except flname The * and ? don’t match all filenames beginning with a . and the / of a pathname. Escaping and Quoting \* is escaping, the asterisk has to be treated and matched literally instead of being interpreted as a metacharacter. When a command argument is enclosed in quotes, the meanings of all encloded special characters are turned off. It is quoting. Stdin, Stdout, Stderr Stdin – the file representing input, which is connected to the keyboard. File descriptor 0. 3 possible input source: the keyboard, a file (using <), or another program using a pipeline. Stdout – the file representing output, which is connected to the display. File descriptor 1. 3 possible destinations: the terminal, a file (using> or >>), and as input to another program using a pipeline Stderr – the file representing error messages that emanate from the command or shell. It is also connected to the display. File descriptor 2. Using Completion in the bash shell bash‐2.00$ ls Complete NewProject bogus2 ftp puppy Completed News dead.letter mail temp Mail access Files public_html testme bash‐2.00$ cd public_html/ bash‐2.00$ Note: type cd pub and press the Tab key to complete the public_html. Viewing Session History in the bash Shell [ejr@hobbes clean]$ ls background.htm info.htm logo.gif [ejr@hobbes clean]$ ls (by typing [up arrow] key to reuse the previous command) background.htm info.htm logo.gif [ejr@hobbes clean]$ history 1 free 2 id deb 3 id ejr 4 uname ‐a 5 ls ... 40 cd 41 cp .bash_history oldhistory 42 vi .bash_history 43 elm … [ejr@hobbes clean]$ !40 cd [ejr@hobbes ejr]$ Note: Commands of previous session are kept in the ~/.bask_history file. Changing Your Identity with su [ejr@hobbes asr]$ ls Projects testing [ejr@hobbes asr]$ su asr Password: [asr@hobbes asr]$ ls Projects testing [asr@hobbes asr]$ su ‐ ejr Password: [ejr@hobbes ejr]$ ls Mail editme script2.sed Projects fortunes.copy scriptextra.sed Xrootenv.0 fortunesl.txt sedtest above.Htm fortunes2.txt sorted.address.temp address.book groups temp.htm address.temp history.txt tempsort axhome html.htm test html.html test2 chmod.txt mail testing.gif clean manipulate testing.wp compression nsmail typescript [ejr@hobbes ejr]$ exit [asr@hobbes asr]$ exit [ejr@hobbes ejr]$ exit Note: su without specifying a username, assume you are changing to root. Root Access Security and Hyphen (‐) Be careful when you login as the root. Use su to change to root will provide a little extra security. if you su to another user (no hyphen) and the new user doesn’t have read and execute permissions for the current directory, you will see error message. The addition of the hyphen (‐) will force a new login shell with all environment variables and defaults according to the settings for the user you are switching to. Fixing Terminal Settings with stty If Backspace and Delete keys are not working properly (usually occurs when using telnet), you may fix it using stty erase ‘^?’ or stty erase ‘^H’ Depending upon your terminal, you may need to type stty erase and press Backspace key, and type stty erase ‘^H’ and press Ctrl+H.
Recommended publications
  • Unix Introduction
    Unix introduction Mikhail Dozmorov Summer 2018 Mikhail Dozmorov Unix introduction Summer 2018 1 / 37 What is Unix Unix is a family of operating systems and environments that exploits the power of linguistic abstractions to perform tasks Unix is not an acronym; it is a pun on “Multics”. Multics was a large multi-user operating system that was being developed at Bell Labs shortly before Unix was created in the early ’70s. Brian Kernighan is credited with the name. All computational genomics is done in Unix http://www.read.seas.harvard.edu/~kohler/class/aosref/ritchie84evolution.pdfMikhail Dozmorov Unix introduction Summer 2018 2 / 37 History of Unix Initial file system, command interpreter (shell), and process management started by Ken Thompson File system and further development from Dennis Ritchie, as well as Doug McIlroy and Joe Ossanna Vast array of simple, dependable tools that each do one simple task Ken Thompson (sitting) and Dennis Ritchie working together at a PDP-11 Mikhail Dozmorov Unix introduction Summer 2018 3 / 37 Philosophy of Unix Vast array of simple, dependable tools Each do one simple task, and do it really well By combining these tools, one can conduct rather sophisticated analyses The Linux help philosophy: “RTFM” (Read the Fine Manual) Mikhail Dozmorov Unix introduction Summer 2018 4 / 37 Know your Unix Unix users spend a lot of time at the command line In Unix, a word is worth a thousand mouse clicks Mikhail Dozmorov Unix introduction Summer 2018 5 / 37 Unix systems Three common types of laptop/desktop operating systems: Windows, Mac, Linux. Mac and Linux are both Unix-like! What that means for us: Unix-like operating systems are equipped with “shells”" that provide a command line user interface.
    [Show full text]
  • Introduction to Unix
    Introduction to Unix Rob Funk <[email protected]> University Technology Services Workstation Support http://wks.uts.ohio-state.edu/ University Technology Services Course Objectives • basic background in Unix structure • knowledge of getting started • directory navigation and control • file maintenance and display commands • shells • Unix features • text processing University Technology Services Course Objectives Useful commands • working with files • system resources • printing • vi editor University Technology Services In the Introduction to UNIX document 3 • shell programming • Unix command summary tables • short Unix bibliography (also see web site) We will not, however, be covering these topics in the lecture. Numbers on slides indicate page number in book. University Technology Services History of Unix 7–8 1960s multics project (MIT, GE, AT&T) 1970s AT&T Bell Labs 1970s/80s UC Berkeley 1980s DOS imitated many Unix ideas Commercial Unix fragmentation GNU Project 1990s Linux now Unix is widespread and available from many sources, both free and commercial University Technology Services Unix Systems 7–8 SunOS/Solaris Sun Microsystems Digital Unix (Tru64) Digital/Compaq HP-UX Hewlett Packard Irix SGI UNICOS Cray NetBSD, FreeBSD UC Berkeley / the Net Linux Linus Torvalds / the Net University Technology Services Unix Philosophy • Multiuser / Multitasking • Toolbox approach • Flexibility / Freedom • Conciseness • Everything is a file • File system has places, processes have life • Designed by programmers for programmers University Technology Services
    [Show full text]
  • “Linux at the Command Line” Don Johnson of BU IS&T  We’Ll Start with a Sign in Sheet
    “Linux at the Command Line” Don Johnson of BU IS&T We’ll start with a sign in sheet. We’ll end with a class evaluation. We’ll cover as much as we can in the time allowed; if we don’t cover everything, you’ll pick it up as you continue working with Linux. This is a hands-on, lab class; ask questions at any time. Commands for you to type are in BOLD The Most Common O/S Used By BU Researchers When Working on a Server or Computer Cluster Linux is a Unix clone begun in 1991 and written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. 64% of the world’s servers run some variant of Unix or Linux. The Android phone and the Kindle run Linux. a set of small Linux is an O/S core programs written by written by Linus Richard Stallman and Torvalds and others others. They are the AND GNU utilities. http://www.gnu.org/ Network: ssh, scp Shells: BASH, TCSH, clear, history, chsh, echo, set, setenv, xargs System Information: w, whoami, man, info, which, free, echo, date, cal, df, free Command Information: man, info Symbols: |, >, >>, <, ;, ~, ., .. Filters: grep, egrep, more, less, head, tail Hotkeys: <ctrl><c>, <ctrl><d> File System: ls, mkdir, cd, pwd, mv, touch, file, find, diff, cmp, du, chmod, find File Editors: gedit, nedit You need a “xterm” emulation – software that emulates an “X” terminal and that connects using the “SSH” Secure Shell protocol. ◦ Windows Use StarNet “X-Win32:” http://www.bu.edu/tech/support/desktop/ distribution/xwindows/xwin32/ ◦ Mac OS X “Terminal” is already installed Why? Darwin, the system on which Apple's Mac OS X is built, is a derivative of 4.4BSD-Lite2 and FreeBSD.
    [Show full text]
  • Shell Variables
    Shell Using the command line Orna Agmon ladypine at vipe.technion.ac.il Haifux Shell – p. 1/55 TOC Various shells Customizing the shell getting help and information Combining simple and useful commands output redirection lists of commands job control environment variables Remote shell textual editors textual clients references Shell – p. 2/55 What is the shell? The shell is the wrapper around the system: a communication means between the user and the system The shell is the manner in which the user can interact with the system through the terminal. The shell is also a script interpreter. The simplest script is a bunch of shell commands. Shell scripts are used in order to boot the system. The user can also write and execute shell scripts. Shell – p. 3/55 Shell - which shell? There are several kinds of shells. For example, bash (Bourne Again Shell), csh, tcsh, zsh, ksh (Korn Shell). The most important shell is bash, since it is available on almost every free Unix system. The Linux system scripts use bash. The default shell for the user is set in the /etc/passwd file. Here is a line out of this file for example: dana:x:500:500:Dana,,,:/home/dana:/bin/bash This line means that user dana uses bash (located on the system at /bin/bash) as her default shell. Shell – p. 4/55 Starting to work in another shell If Dana wishes to temporarily use another shell, she can simply call this shell from the command line: [dana@granada ˜]$ bash dana@granada:˜$ #In bash now dana@granada:˜$ exit [dana@granada ˜]$ bash dana@granada:˜$ #In bash now, going to hit ctrl D dana@granada:˜$ exit [dana@granada ˜]$ #In original shell now Shell – p.
    [Show full text]
  • LPI 101 – Work on the Command Line [5] (Linux Professional Institute Certification) A
    – LPI 101 – Work on the Command Line [5] (Linux Professional Institute Certification) a .˜. /V\ by: geoffrey robertson // \\ [email protected] @._.@ $Id: gl1.103.1.slides.tex,v 1.3 2003/05/30 05:09:04 waratah Exp $ a c Copyright 2002 Geoffrey Robertson, Andrew Eager. Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation—either version 2 of the License or (at your option) any later version. 1 Work on the command line [5] Objective Candidate should be able to interact with shells and commands using the command line. This includes typing valid commands and command sequences, defining, referencing and exporting environment variables, using command history and editing facilities, invoking commands in the path and outside the path, using command substitution, applying commands recursively through a directory tree and using man to find about commands. 2 Work on the command line [5] Key files, terms, and utilities ¡ . ¡ man ¡ bash ¡ pwd ¡ echo ¡ set ¡ env ¡ unset ¡ ¡ exec ˜/.bash history ¡ ¡ export ˜/.profile 3 Work on the command line [5] Resources of interest LPI Certification in a Nutshell pp15—19 LPIC 1 Cert. Bible Chapter 2 Linux Shells by Example by Ellie Quigley 4 Shells Command Line Interface ¡ A shell is the program that provides a Command Line Interface to the operating system. 5 Shells may be accessed in various ways: – Virtual Console – Terminal attached to a serial line – Remote access over tcp/ip with telnet, rsh or ssh – An X terminal run on an X session, either on the local console or remotely See /etc/inittab Shells Command Line Interface ¡ A shell is the program that provides a Command Line Interface to the operating system.
    [Show full text]
  • CS246—Linux Command Summary
    CS246|Linux Command Summary Commands Command Meaning Options exit log out passwd change your password clear clear screen man command show the manual page for command man -k word show a list of man pages that mention word history display all previously-issued com- mands !! execute most recently-issued com- mand !c execute most recently-issued com- mand starting with c whoami display your login name date display current date and time pwd display current directory ls list contents of current directory ls -a show all files, including hidden files ls -l show in long format cp file1 file2 copy file1 to file2 cp -r dir1 dir2 recursively copy dir1 to dir2 mv file1 file2 move file1 to file2 (also use to re- name) rm file remove file can be used to recursively remove a directory, if -r option is used cd dir change directory to dir cd - return to most recently visited directory mkdir dir create new directory dir in current di- can specify more than one directory at once rectory rmdir dir remove directory dir only works if dir is empty; if not empty, use rm -r dir; can specify more than directory at once echo string display string to screen chmod perms file set permissions on file to perms chfn change personal info (name, address, etc.) on Unix system chsh change your login shell ps display current processes ps -a show all users' processes ps -A show ALL processes (incl. system processes) kill pid kill process with number pid kill -9 pid more forceful kill, for stubborn processes who show who is logged into this machine finger username show personal info for username time command show amount of time taken executing command fg bring background job to the fore- useful if you accidentally ran vi or emacs with an & ground find dir -name \pattern" find all files whose names match pat- tern in dir and its subdirectories 1 Tools Tool Purpose Options cat f1 f2 ..
    [Show full text]
  • Shells and Shell Programming
    Shells & Shell Programming (Part A) Software Tools EECS2031 Winter 2018 Manos Papagelis Thanks to Karen Reid and Alan J Rosenthal for material in these slides SHELLS 2 What is a Shell • A shell is a command line interpreter that is the interface between the user and the OS. • The shell: – analyzes each command – determines what actions are to be performed – performs the actions • Example: wc –l file1 > file2 3 Which shell? • sh – Bourne shell – Most common, other shells are a superset – Good for programming • csh or tcsh – command-line default on EECS labs – C-like syntax – Best for interactive use. • bash – default on Linux (Bourne again shell) – Based on sh, with some csh features. • korn – written by David Korn – Based on sh – Some claim best for programming. – Commercial product. 4 bash versus sh • On EECS labs, when you run sh, you are actually running bash. • bash is a superset of sh. • For EECS2031, you will be learning only the features of the language that belong to sh. 5 Changing your shell • I recommend changing your working shell on EECS to bash – It will make it easier to test your shell programs. – You will only need to learn one set of syntax. • What to do: – echo $SHELL (to check your current shell) – chsh <userid> bash – Logout and log back in. – .profile is executed every time you log in, so put your environment variables there 6 Standard Streams • Preconnected input and output channels between a computer program and its environment. There are 3 I/O connections: – standard input (stdin) – standard output (stdout) – standard
    [Show full text]
  • Linux Command Line Interface
    Linux Command Line Interface December 27, 2017 Foreword I It is supposed to be a refresher (?!) I If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I I will not talk about editors (vi, emacs...) Basics I (Computer) Terminal: Hardware device for data entry and display; I Terminal Emulator (aka tty): An application program replacing a computer terminal. Many of those, OS dependent (cmd for DOS/Win; Terminal for OS X; xterm for Linux; ...); I The Terminal provides user access to the computer through the Command Line Interface (CLI) where the user issues commands. I The CLI "dialect" is the Shell. In UNIX-like systems a lot of dialects exists: sh, bash, csh, tcsh, ksh, zsh... I I will only use the bash shell. Shell I How to access a shell I Logging in to your own Linux (virtual) box (CTRL-ALT-F1/CTRL-ALT-F7); I Opening a graphic terminal (xterm...); I SSHing into a server. I To know which shell you use: echo $SHELL I use this font to denote commands I SHELL is an environment variable I echo is a command Commands I apropos: search the manual page names and descriptions I man: manual page (try man apropos, man man) Almost every command, system program, or API has a man page man apropos, man fread, man pthreads, man 1 open, man 2 open Reading man pages is a very worthwhile activity I Not everything is a command... type <cmd> type man (command), type echo (shell built-in), type ls (alias (well..
    [Show full text]
  • Linux Shell Scripting Cookbook Second Edition
    Linux Shell Scripting Cookbook Second Edition Over 110 practical recipes to solve real-world shell problems, guaranteed to make you wonder how you ever lived without them Shantanu Tushar Sarath Lakshman BIRMINGHAM - MUMBAI Linux Shell Scripting Cookbook Second Edition Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: January 2011 Second edition: May 2013 Production Reference: 1140513 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78216-274-2 www.packtpub.com Cover Image by Parag Kadam ([email protected]) Credits Authors Project Coordinator Shantanu Tushar Shiksha Chaturvedi Sarath Lakshman Proofreader Reviewers Linda Morris Rajeshwari K. John C. Kennedy Indexer Hemangini Bari Anil Kumar Sudhendu Kumar Production Coordinator Aravind SV Shantanu Zagade Acquisition Editor Cover Work Kartikey Pandey Shantanu Zagade Lead Technical Editor Ankita Shashi Technical Editors Jalasha D'costa Amit Ramadas Lubna Shaikh About the Authors Shantanu Tushar is an advanced GNU/Linux user since his college days.
    [Show full text]
  • Unix Command
    Veloce descrizione di comandi Unix Buona parte dei comandi dell’elenco seguente fanno parte della distribuzione standard di molte architetture Unix. Per i dettagli vedere le relative pagine di manuale, invocabili con il comando "man topic". a2p convertitore awk - perl amstex AmSTeX language create, modify, and extract from archives (per creare ar librerie) arch print machine architecture at, batch, atq, atrm - queue, examine or delete jobs for later at execution awk gawk - pattern scanning and processing language basename strip directory and suffix from filenames bash GNU Bourne-Again SHell bc An arbitrary precision calculator language bibtex make a bibliography for (La)TeX c++ GNU project C++ Compiler cal displays a calendar cat concatenate files and print on the standard output cc gcc, g++ - GNU project C and C++ Compiler checkalias usage: /usr/bin/checkalias alias .. chfn change your finger information chgrp change the group ownership of files chmod change the access permissions of files chown change the user and group ownership of files chsh change your login shell cksum checksum and count the bytes in a file clear clear terminal screen cmp compare two files col filter reverse line feeds from input column columnate lists comm compare two sorted files line by line compress compress, uncompress, zcat - compress and expand data cp copy files cpio copy files to and from archives tcsh - C shell with file name completion and command line csh editing csplit split a file into sections determined by context lines cut remove sections from each
    [Show full text]
  • A Generalization of CHSH and the Algebraic Structure of Optimal Strategies
    A generalization of CHSH and the algebraic structure of optimal strategies David Cui1, Arthur Mehta1, Hamoon Mousavi2, and Seyed Sajjad Nezhadi2 1Department of Mathematics, University of Toronto, Toronto, Canada. 2Department of Computer Science, University of Toronto, Toronto, Canada. Self-testing has been a rich area of study in quantum information theory. It allows an experimenter to interact classically with a black box quantum system and to test that a specific entangled state was present and a specific set of measurements were performed. Recently, self-testing has been central to high-profile results in complexity theory as seen in the work on entangled games PCP of Natarajan and Vidick (FOCS 2018), iterated compression by Fitzsimons et al. (STOC 2019), and NEEXP in MIP* due to Natarajan and Wright (FOCS 2019). The most studied self-test is the CHSH game which features a bipartite system with two isolated devices. This game certifies the presence of a single EPR entangled state and the use of anti-commuting Pauli measurements. Most of the self-testing literature has focused on extending these results to self-test for tensor products of EPR states and tensor products of Pauli measurements. In this work, we introduce an algebraic generalization of CHSH by viewing it as a linear constraint system (LCS) game, exhibiting self-testing properties that are qualitatively different. These provide the first example of LCS games that self-test non-Pauli operators resolving an open question posed by Coladangelo and Stark (QIP 2017). Our games also provide a self-test for states other than the maximally entangled state, and hence resolves the open question posed by Cleve and Mittal (ICALP 2012).
    [Show full text]
  • Basics of UNIX
    Basics of UNIX August 23, 2012 By UNIX, I mean any UNIX-like operating system, including Linux and Mac OS X. On the Mac you can access a UNIX terminal window with the Terminal application (under Applica- tions/Utilities). Most modern scientific computing is done on UNIX-based machines, often by remotely logging in to a UNIX-based server. 1 Connecting to a UNIX machine from {UNIX, Mac, Windows} See the file on bspace on connecting remotely to SCF. In addition, this SCF help page has infor- mation on logging in to remote machines via ssh without having to type your password every time. This can save a lot of time. 2 Getting help from SCF More generally, the department computing FAQs is the place to go for answers to questions about SCF. For questions not answered there, the SCF requests: “please report any problems regarding equipment or system software to the SCF staff by sending mail to ’trouble’ or by reporting the prob- lem directly to room 498/499. For information/questions on the use of application packages (e.g., R, SAS, Matlab), programming languages and libraries send mail to ’consult’. Questions/problems regarding accounts should be sent to ’manager’.” Note that for the purpose of this class, questions about application packages, languages, li- braries, etc. can be directed to me. 1 3 Files and directories 1. Files are stored in directories (aka folders) that are in a (inverted) directory tree, with “/” as the root of the tree 2. Where am I? > pwd 3. What’s in a directory? > ls > ls -a > ls -al 4.
    [Show full text]