Presentation Slides Introduction to Linux Dr

Total Page:16

File Type:pdf, Size:1020Kb

Presentation Slides Introduction to Linux Dr https://bit.ly/3bUvR1s presentation slides Introduction to Linux Dr. Yongjun Choi 03/16/2021 Geting help • Wiki: https://wiki.hpcc.msu.edu/x/4ACE • Submit a ticket: https://contact.icer.msu.edu/contact External resources to learn Linux http://ss64.com/bash/ "An A-Z Index of the Bash command line for Linux." with links to 'man' manual page for each. It includes many commands that you will never use, or are specific to certain versions of linux https://fosswire.com/post/2007/08/unixlinux-command-cheat-sheet/ useful cheatsheet organized by topic https://cvw.cac.cornell.edu/linux/ Full intro to Linux http://guide.bash.academy step by step intro with lots of explanatory text MSU HPC runs Linux • We will use the MSU High Performance Computing Cluster for this course. • consistent experience (Windows, Mac laptop diversity) • It’s a system we know • Highly availability • Course is pre-requisite for other HPCC courses Get started • 1. Install/identify laptop software to connect • 2. Connect to HPC with secure shell • 3. Does your account work? Troubleshoot if necessary • 4. Test basic commands • Step 1: Install Software (if you haven’t) • Windows: install ‘MobaXterm’ free Unix emulation app • When installed, start program and then start New Session • Mac OS X: included a unix terminal, but install Xquartz for GUI • Open the application /Applications/Utilities/Terminal.app Get connected • From the terminal/MobaXterm • Type: ssh [email protected] • You can also use: ssh -Y [email protected] • -Y (or -X) is an option for GUI • Enter password - it is hidden and doesn’t look like you are typing, but you are. Linux commands • What is command? • $ <command> <arguments(s)> <optional file/dir name> • $ ls -l -a • ls: command (list files), -l, -a: arguments (l: long format, a: all files including hidden files) • $ wc - l myfile.txt • wc: command (word count), -l: argument (line count), myfile.txt: filename Basic commands • cd: change directory • ls: list • pwd: current location • mkdir: make a directory • cp: copy files/dirs • rm: remove/rename files/dirs ls • ls: list files and directories • some options for ls command • -a list all files and directories including hidden contents • -h: print sizes in human readable format (e.g. 1k, 2.5M, 3.1G) • -l: list with a long listing format • -t: sort my modification time Exploring files and folders with ls • Step one, explore your home directory with a command ‘ls’ • Note when giving command examples, $ at the begging is the prompt (you SHOULD NOT type it). Try these commands and check the difference. • $ ls show files • $ ls -l shows files in long view • $ ls -al shows all files • $ ls /mnt/home lists folders of users • $ ls /mnt/home/your_net_id • Now try someone else’s folder - what happens? • $ ls /mnt/home/choiyj cd • cd directory_name: change to named directory • cd: change to home dir • cd ~: change to home dir • cd ..: change to one level upper dir • cd -: change to the previous dir cp, mkdir mv, rm, rmdir • cp <from> <to>: copy files • cp -r <from> <to>: copy recursively: files and directories • mkdir: make a named directory • mv <from> <to>: move/rename files/folders • rm filename: remove a named file • rm -r dirname: remove a nanmed dir (incluidng all sub directories and files) • EX: Can you create a folder ‘test folder’ with mkdir? There IS a space between ‘test’ and ‘folder’. • Question? Use man. eg: man cp manipulation exercise • Create linux_workshop dir on your home. • Copy a folder and contents for this class from • /mnt/research/common-data/workshops/intro2Linux_2021_03_16 • to linux_workshop dir on your home • Go to linux_workshop • Find a hidden directory and rename it to not_hidden • Check the contents of not_hidden • Create a new directory called new_dir • Copy the file youfoundit.txt into new_dir • remove garbage dir Files and folders • Linux has a single directory ‘tree’, separated by slash, th top is the ‘root’. • All additional disk are connected on /mnt ‘mounted’. • No concept of driver letters • From your home, try $ tree -L 1, and $ tree -L 2 Exploring files and folders • On our system • /mnt/home/ are all user home directories folders • /mnt/scratch/ are working files • /bin and /usr/bin and /opt/software software • User pwd to determin your current point in the tree • use ls -l to see all files in your folder; note it starts with two entries single dot (.) short cut representing current folder, and double dot (..) short cut representing parent folder • cd: change directory. cd .. —> go up one level • ~ is shortcut for your home directory: Try $ cd ~ • Files are specified by the ‘path’ through directory tree • Path can be full (/mnt/home/choiyj/.bashrc) starting with / • or relative, from the current location ~/.bashrc File permissions • $ ls /mnt/home/choiyj • $ ls /mnt/scratch/choiyj • Linux has a method to keep files private and save. • permission for user, user groups, and all others File permissions • User, Group, other have read, write, or execute permissions. • Permissions are set with ‘chmod’ command, and ownwerhsip set with ‘chown’ • You can only change these for files you are the owner of. • Dont grant other/owrld permission on yur home folder. Keep it private! chmod • excutable: 1, write: 2, read: 4, • chmod 777 file1.txt: open ‘file1.txt’ to the whole world. Never do that! • you can use • chmod g+w file1.txt: opn to your group for writing access. • https://en.wikipedia.org/wiki/Chmod redirection • >: write to, • >> : append to • 1: stdout • 2: stderr; • >&: redirection operation • eg: prog > outfile 2>&1 : send stdout and stderr to ‘outfile’ Wildcards • *: anything or nothing • ?: single character • [ ]: any character or range of characters • [! ]: inverse the match of [ ] • $ ls *.txt # list all txt files • $ ls *-?.txt # list all files with ‘-‘ and with one cha in front of ‘.txt’ • $ ls [0-9]*.txt # list all files start with a number. • $ ls [A-Z]*.txt # list all files start with a capital letter? • Try ls [[:lower:]].txt; ls [[:upper:]].txt; ls [[:lower:][:upper:]].txt • $ ls [!a-Z]*.txt # list txt files that don’t begin with any letter. • https://wiki.hpcc.msu.edu/display/ITH/Regular+Expressions Learning commands with manual pages • Linux includes a built in manual for nearly all commands. Type ‘man’ followed by the commands. e.g. • $man man • To navigate the man pages use the arrow keys to scroll up and down or use the enter key to advance al ine, space bar to advance a page, letter u to go back a page. Use the q key to quit out of the display. • The manual pages often include these sections: • Name: a one line desctiption of what it does • Synopsis: basic syntax for the command line. • Description: describes the program’s functionalities. • Options: lists commnand line options available for this program. • Example: examples of some of the options available. • See Also: list of related commands. • Note that options can be with single dash ‘-‘ or double dash ‘—’ Learning commands with manual pages • review tha man pages of common file/directory commnds • ls, mkdir, cp, pwd, cat • How can you list all files in a folder, including hidden files that start with a dot (.)? • Which command would create a folder ‘class’ in your home directory? Can you do that? what are the options for this command? • What does pwd do? Shell environment variables • Shell maintains and you can set ‘variables’ that the shell uses for configuration and in your script. • Variables start with $, and can be seen with echo $VARNAME • Explore common variables with the echo command and list what they are • $HOME, $USER, $SHELL, $PATH • Combine variables in an echo command to make a greeting. • Set a variable of your own, then use in the sentence. • GREETING=Hello; echo $GREETING, $USER - welcom to $HOME • https://wiki.hpcc.msu.edu/display/ITH/1.+Variables+-+Part+I • https://wiki.hpcc.msu.edu/display/ITH/1.+Variables+-+Part+II $PATH • BASH looks for programs in each folder listed in $PATH • When you type a program name, how does the shell find it? Let’s try the wich command, it shows the location of programs. • which date • which less • which python • each of these folders in the path variable. Command input/output • Most commands take text as input and output results as text • $ ls -l output text to the screen • $ ls -l > filelist.txt redirect text into a new file ‘filelist.txt’ • $ ls -l >> filelist.txt redirect text into ‘filelist.txt’ (added at the end of the file) • $ ls -l | grep txt pipe text into another command • $ wc -l < filelist.txt redirect file as input into command • $ cat filelist.txt |wc -l outputfile, pipe into command • Some commands for data • wc: count words, lines or characters • who | wc -l # number of users logged in • grep: find patterns in files or data, returns just matching lines • who |grep $USER • sort: given a list of items, sort in various ways • who | sort • head: list only top n lines of file • who > who.txt; head who.txt • tail: list only last n lines of file Some commands for data • zip: creat zip of multiple files • unzip: unzip • tar: create (tar -c) or extract (tar -x) ‘tape archive’ file. • Exercise : • Using the man pages, find out what the default number of lines that head and tail will display, and how to limit those to just one line • Can you tar all files and folders in workshop folder? Question? Use man. Creating/editing text files • You can create/edit files on your local machin and transfer them using ftp app. • Downside: very slow process. • need to run command ‘dos2unix’ if the file is created under Windows system. • Much faster in the long term to learn how to edit files with Linux editors.
Recommended publications
  • Shell Scripting with Bash
    Introduction to Shell Scripting with Bash Charles Jahnke Research Computing Services Information Services & Technology Topics for Today ● Introductions ● Basic Terminology ● How to get help ● Command-line vs. Scripting ● Variables ● Handling Arguments ● Standard I/O, Pipes, and Redirection ● Control Structures (loops and If statements) ● SCC Job Submission Example Research Computing Services Research Computing Services (RCS) A group within Information Services & Technology at Boston University provides computing, storage, and visualization resources and services to support research that has specialized or highly intensive computation, storage, bandwidth, or graphics requirements. Three Primary Services: ● Research Computation ● Research Visualization ● Research Consulting and Training Breadth of Research on the Shared Computing Cluster (SCC) Me ● Research Facilitator and Administrator ● Background in biomedical engineering, bioinformatics, and IT systems ● Offices on both CRC and BUMC ○ Most of our staff on the Charles River Campus, some dedicated to BUMC ● Contact: [email protected] You ● Who has experience programming? ● Using Linux? ● Using the Shared Computing Cluster (SCC)? Basic Terminology The Command-line The line on which commands are typed and passed to the shell. Username Hostname Current Directory [username@scc1 ~]$ Prompt Command Line (input) The Shell ● The interface between the user and the operating system ● Program that interprets and executes input ● Provides: ○ Built-in commands ○ Programming control structures ○ Environment
    [Show full text]
  • Windows Command Prompt Cheatsheet
    Windows Command Prompt Cheatsheet - Command line interface (as opposed to a GUI - graphical user interface) - Used to execute programs - Commands are small programs that do something useful - There are many commands already included with Windows, but we will use a few. - A filepath is where you are in the filesystem • C: is the C drive • C:\user\Documents is the Documents folder • C:\user\Documents\hello.c is a file in the Documents folder Command What it Does Usage dir Displays a list of a folder’s files dir (shows current folder) and subfolders dir myfolder cd Displays the name of the current cd filepath chdir directory or changes the current chdir filepath folder. cd .. (goes one directory up) md Creates a folder (directory) md folder-name mkdir mkdir folder-name rm Deletes a folder (directory) rm folder-name rmdir rmdir folder-name rm /s folder-name rmdir /s folder-name Note: if the folder isn’t empty, you must add the /s. copy Copies a file from one location to copy filepath-from filepath-to another move Moves file from one folder to move folder1\file.txt folder2\ another ren Changes the name of a file ren file1 file2 rename del Deletes one or more files del filename exit Exits batch script or current exit command control echo Used to display a message or to echo message turn off/on messages in batch scripts type Displays contents of a text file type myfile.txt fc Compares two files and displays fc file1 file2 the difference between them cls Clears the screen cls help Provides more details about help (lists all commands) DOS/Command Prompt help command commands Source: https://technet.microsoft.com/en-us/library/cc754340.aspx.
    [Show full text]
  • GNU Grep: Print Lines That Match Patterns Version 3.7, 8 August 2021
    GNU Grep: Print lines that match patterns version 3.7, 8 August 2021 Alain Magloire et al. This manual is for grep, a pattern matching engine. Copyright c 1999{2002, 2005, 2008{2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents 1 Introduction ::::::::::::::::::::::::::::::::::::: 1 2 Invoking grep :::::::::::::::::::::::::::::::::::: 2 2.1 Command-line Options ::::::::::::::::::::::::::::::::::::::::: 2 2.1.1 Generic Program Information :::::::::::::::::::::::::::::: 2 2.1.2 Matching Control :::::::::::::::::::::::::::::::::::::::::: 2 2.1.3 General Output Control ::::::::::::::::::::::::::::::::::: 3 2.1.4 Output Line Prefix Control :::::::::::::::::::::::::::::::: 5 2.1.5 Context Line Control :::::::::::::::::::::::::::::::::::::: 6 2.1.6 File and Directory Selection:::::::::::::::::::::::::::::::: 7 2.1.7 Other Options ::::::::::::::::::::::::::::::::::::::::::::: 9 2.2 Environment Variables:::::::::::::::::::::::::::::::::::::::::: 9 2.3 Exit Status :::::::::::::::::::::::::::::::::::::::::::::::::::: 12 2.4 grep Programs :::::::::::::::::::::::::::::::::::::::::::::::: 13 3 Regular Expressions ::::::::::::::::::::::::::: 14 3.1 Fundamental Structure ::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Introduction to UNIX at MSI June 23, 2015 Presented by Nancy Rowe
    Introduction to UNIX at MSI June 23, 2015 Presented by Nancy Rowe The Minnesota Supercomputing Institute for Advanced Computational Research www.msi.umn.edu/tutorial/ © 2015 Regents of the University of Minnesota. All rights reserved. Supercomputing Institute for Advanced Computational Research Overview • UNIX Overview • Logging into MSI © 2015 Regents of the University of Minnesota. All rights reserved. Supercomputing Institute for Advanced Computational Research Frequently Asked Questions msi.umn.edu > Resources> FAQ Website will be updated soon © 2015 Regents of the University of Minnesota. All rights reserved. Supercomputing Institute for Advanced Computational Research What’s the difference between Linux and UNIX? The terms can be used interchangeably © 2015 Regents of the University of Minnesota. All rights reserved. Supercomputing Institute for Advanced Computational Research UNIX • UNIX is the operating system of choice for engineering and scientific workstations • Originally developed in the late 1960s • Unix is flexible, secure and based on open standards • Programs are often designed “to do one simple thing right” • Unix provides ways for interconnecting these simple programs to work together and perform more complex tasks © 2015 Regents of the University of Minnesota. All rights reserved. Supercomputing Institute for Advanced Computational Research Getting Started • MSI account • Service Units required to access MSI HPC systems • Open a terminal while sitting at the machine • A shell provides an interface for the user to interact with the operating system • BASH is the default shell at MSI © 2015 Regents of the University of Minnesota. All rights reserved. Supercomputing Institute for Advanced Computational Research Bastion Host • login.msi.umn.edu • Connect to bastion host before connecting to HPC systems • Cannot run software on bastion host (login.msi.umn.edu) © 2015 Regents of the University of Minnesota.
    [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]
  • What Is UNIX? the Directory Structure Basic Commands Find
    What is UNIX? UNIX is an operating system like Windows on our computers. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops. The Directory Structure All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally called root (written as a slash / ) Basic commands When you first login, your current working directory is your home directory. In UNIX (.) means the current directory and (..) means the parent of the current directory. find command The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files that match the supplied search criteria. The syntax looks like this: find where-to-look criteria what-to-do All arguments to find are optional, and there are defaults for all parts. where-to-look defaults to . (that is, the current working directory), criteria defaults to none (that is, select all files), and what-to-do (known as the find action) defaults to ‑print (that is, display the names of found files to standard output). Examples: find . –name *.txt (finds all the files ending with txt in current directory and subdirectories) find . -mtime 1 (find all the files modified exact 1 day) find . -mtime -1 (find all the files modified less than 1 day) find . -mtime +1 (find all the files modified more than 1 day) find .
    [Show full text]
  • UNIX X Command Tips and Tricks David B
    SESUG Paper 122-2019 UNIX X Command Tips and Tricks David B. Horvath, MS, CCP ABSTRACT SAS® provides the ability to execute operating system level commands from within your SAS code – generically known as the “X Command”. This session explores the various commands, the advantages and disadvantages of each, and their alternatives. The focus is on UNIX/Linux but much of the same applies to Windows as well. Under SAS EG, any issued commands execute on the SAS engine, not necessarily on the PC. X %sysexec Call system Systask command Filename pipe &SYSRC Waitfor Alternatives will also be addressed – how to handle when NOXCMD is the default for your installation, saving results, and error checking. INTRODUCTION In this paper I will be covering some of the basics of the functionality within SAS that allows you to execute operating system commands from within your program. There are multiple ways you can do so – external to data steps, within data steps, and within macros. All of these, along with error checking, will be covered. RELEVANT OPTIONS Execution of any of the SAS System command execution commands depends on one option's setting: XCMD Enables the X command in SAS. Which can only be set at startup: options xcmd; ____ 30 WARNING 30-12: SAS option XCMD is valid only at startup of the SAS System. The SAS option is ignored. Unfortunately, ff NOXCMD is set at startup time, you're out of luck. Sorry! You might want to have a conversation with your system administrators to determine why and if you can get it changed.
    [Show full text]
  • Chapter 10 SHELL Substitution and I/O Operations
    Chapter 10 SHELL Substitution and I/O Operations 10.1 Command Substitution Command substitution is the mechanism by which the shell performs a given set of commands and then substitutes their output in the place of the commands. Syntax: The command substitution is performed when a command is given as: `command` When performing command substitution make sure that you are using the backquote, not the single quote character. Example: Command substitution is generally used to assign the output of a command to a variable. Each of the following examples demonstrate command substitution: #!/bin/bash DATE=`date` echo "Date is $DATE" USERS=`who | wc -l` echo "Logged in user are $USERS" UP=`date ; uptime` echo "Uptime is $UP" This will produce following result: Date is Thu Jul 2 03:59:57 MST 2009 Logged in user are 1 Uptime is Thu Jul 2 03:59:57 MST 2009 03:59:57 up 20 days, 14:03, 1 user, load avg: 0.13, 0.07, 0.15 10.2 Shell Input/Output Redirections Most Unix system commands take input from your terminal and send the resulting output back to your terminal. A command normally reads its input from a place called standard input, which happens to be your terminal by default. Similarly, a command normally writes its output to standard output, which is also your terminal by default. Output Redirection: The output from a command normally intended for standard output can be easily diverted to a file instead. This capability is known as output redirection: If the notation > file is appended to any command that normally writes its output to standard output, the output of that command will be written to file instead of your terminal: Check following who command which would redirect complete output of the command in users file.
    [Show full text]
  • The Linux Command Line Presentation to Linux Users of Victoria
    The Linux Command Line Presentation to Linux Users of Victoria Beginners Workshop August 18, 2012 http://levlafayette.com What Is The Command Line? 1.1 A text-based user interface that provides an environment to access the shell, which interfaces with the kernel, which is the lowest abstraction layer to system resources (e.g., processors, i/o). Examples would include CP/M, MS-DOS, various UNIX command line interfaces. 1.2 Linux is the kernel; GNU is a typical suite of commands, utilities, and applications. The Linux kernel may be accessed by many different shells e.g., the original UNIX shell (sh), the TENEX C shell (tcsh), Korn shell (ksh), and explored in this presentation, the Bourne-Again Shell (bash). 1.3 The command line interface can be contrasted with the graphic user interface (GUI). A GUI interface typically consists of window, icon, menu, pointing-device (WIMP) suite, which is popular among casual users. Examples include MS-Windows, or the X- Window system. 1.4 A critical difference worth noting is that in UNIX-derived systems (such as Linux and Mac OS), the GUI interface is an application launched from the command-line interface, whereas with operating systems like contemporary versions of MS-Windows, the GUI is core and the command prompt is a native MS-Windows application. Why Use The Command Line? 2.1 The command line uses significantly less resources to carry out the same task; it requires less processor power, less memory, less hard-disk etc. Thus, it is preferred on systems where performance is considered critical e.g., supercomputers and embedded systems.
    [Show full text]
  • APPENDIX a Aegis and Unix Commands
    APPENDIX A Aegis and Unix Commands FUNCTION AEGIS BSD4.2 SYSS ACCESS CONTROL AND SECURITY change file protection modes edacl chmod chmod change group edacl chgrp chgrp change owner edacl chown chown change password chpass passwd passwd print user + group ids pst, lusr groups id +names set file-creation mode mask edacl, umask umask umask show current permissions acl -all Is -I Is -I DIRECTORY CONTROL create a directory crd mkdir mkdir compare two directories cmt diff dircmp delete a directory (empty) dlt rmdir rmdir delete a directory (not empty) dlt rm -r rm -r list contents of a directory ld Is -I Is -I move up one directory wd \ cd .. cd .. or wd .. move up two directories wd \\ cd . ./ .. cd . ./ .. print working directory wd pwd pwd set to network root wd II cd II cd II set working directory wd cd cd set working directory home wd- cd cd show naming directory nd printenv echo $HOME $HOME FILE CONTROL change format of text file chpat newform compare two files emf cmp cmp concatenate a file catf cat cat copy a file cpf cp cp Using and Administering an Apollo Network 265 copy std input to std output tee tee tee + files create a (symbolic) link crl In -s In -s delete a file dlf rm rm maintain an archive a ref ar ar move a file mvf mv mv dump a file dmpf od od print checksum and block- salvol -a sum sum -count of file rename a file chn mv mv search a file for a pattern fpat grep grep search or reject lines cmsrf comm comm common to 2 sorted files translate characters tic tr tr SHELL SCRIPT TOOLS condition evaluation tools existf test test
    [Show full text]
  • ANSWERS ΤΟ EVEN-Numbered
    8 Answers to Even-numbered Exercises 2.1. WhatExplain the following unexpected are result: two ways you can execute a shell script when you do not have execute permission for the file containing the script? Can you execute a shell script if you do not have read permission for the file containing the script? You can give the name of the file containing the script as an argument to the shell (for example, bash scriptfile or tcsh scriptfile, where scriptfile is the name of the file containing the script). Under bash you can give the following command: $ . scriptfile Under both bash and tcsh you can use this command: $ source scriptfile Because the shell must read the commands from the file containing a shell script before it can execute the commands, you must have read permission for the file to execute a shell script. 4.3. AssumeWhat is the purpose ble? you have made the following assignment: $ person=zach Give the output of each of the following commands. a. echo $person zach b. echo '$person' $person c. echo "$person" zach 1 2 6.5. Assumengs. the /home/zach/grants/biblios and /home/zach/biblios directories exist. Specify Zach’s working directory after he executes each sequence of commands. Explain what happens in each case. a. $ pwd /home/zach/grants $ CDPATH=$(pwd) $ cd $ cd biblios After executing the preceding commands, Zach’s working directory is /home/zach/grants/biblios. When CDPATH is set and the working directory is not specified in CDPATH, cd searches the working directory only after it searches the directories specified by CDPATH.
    [Show full text]
  • Introduction to Unix Shell
    Introduction to Unix Shell François Serra, David Castillo, Marc A. Marti- Renom Genome Biology Group (CNAG) Structural Genomics Group (CRG) Run Store Programs Data Communicate Interact with each other with us The Unix Shell Introduction Interact with us Rewiring Telepathy Typewriter Speech WIMP The Unix Shell Introduction user logs in The Unix Shell Introduction user logs in user types command The Unix Shell Introduction user logs in user types command computer executes command and prints output The Unix Shell Introduction user logs in user types command computer executes command and prints output user types another command The Unix Shell Introduction user logs in user types command computer executes command and prints output user types another command computer executes command and prints output The Unix Shell Introduction user logs in user types command computer executes command and prints output user types another command computer executes command and prints output ⋮ user logs off The Unix Shell Introduction user logs in user types command computer executes command and prints output user types another command computer executes command and prints output ⋮ user logs off The Unix Shell Introduction user logs in user types command computer executes command and prints output user types another command computer executes command and prints output ⋮ user logs off shell The Unix Shell Introduction user logs in user types command computer executes command and prints output user types another command computer executes command and prints output
    [Show full text]