Command Line Interface Links

Total Page:16

File Type:pdf, Size:1020Kb

Command Line Interface Links 410 2.1 Command Line Bi 410/510: Command Line Interface Links 1 Overview 1.1 covered in Ch 4 and 5 of PCFB 1.2 no project 1.3 suggested exercises to help you get familiar with commands 2 History history.p… 3 File Hierarchy 3.1 in Unix terminology, a folder is called a directory 3.2 directories can contain files of any type or subdirectories 3.3 the top level folder is called the root directory 3.4 download, unpack a file named greeks.tgz [open greeks in Finder] a folder with seven subfolders and a text file use it to practice shell commands 4 Paths 4.1 a string that specifies a set of nested folders is a path 4.2 examples greeks/delta/diogenes.txt greeks/alpha/images/photos.tgz 4.3 the / character between folder names is the separator character Windows uses a backslash (\) Linux and Mac OS X are derived from Unix, use the forward slash (/) 5 Terminal Window 5.1 shell [open Terminal, go to documents] prompt enter command, hit return example: ls (“list the contents of a folder”) 5.2 shell commands first word is name of program to run lots are built in (ls, cd, wc, etc) others are names of applications (python, etc) 5.3 cd / ls first commands to learn: cd (“change directory”) and ls (“list directory”) [dir in Windows] all commands are run from a specific folder, called the “current directory” ** locate where you saved the greeks folder, see if you can use cd commands to navigate to that folder ** type the ls command to show you the contents of the folder 5.4 arguments additional words typed on command line are often file names or other arguments examples: ls greeks ls greeks/delta greeks/epsilon these words are passed to the program as an “argument vector” 5.5 options by convention, arguments that start with a dash are options example: ls -l, ls -a 5 Terminal Window 5.1 shell [open Terminal, go to documents] prompt enter command, hit return example: ls (“list the contents of a folder”) 5.2 shell commands first word is name of program to run lots are built in (ls, cd, wc, etc) others are names of applications (python, etc) 5.3 cd / ls first commands to learn: cd (“change directory”) and ls (“list directory”) [dir in Windows] all commands are run from a specific folder, called the “current directory” **Bi locate 410/510: where you savedCommand the greeks folder, Line see Interface if you can use cd commands to navigate to that folder Links ** type the ls command to show you the contents of the folder 5.4 arguments additional words typed on command line are often file names or other arguments examples: ls greeks ls greeks/delta greeks/epsilon these words are passed to the program as an “argument vector” 5.5 options by convention, arguments that start with a dash are options example: ls -l, ls -a 6 Navigation 6.1 working directory (where commands are executed) 6.2 pwd (print working directory) 6.3 special arguments: . and .. 7 Printing the Contents of a File 7.1 cat 7.2 more 8 Searching 8.1 grep 8.2 egrep 9 Miscellaneous 9.1 echo 9.2 wc (word count) 9.3 head and tail 10 Redirection 10.1 Use > to save output to a file echo “hello, world” echo “hello, world” > hello.txt 11 Pipes 11.1 the “pipe” symbol connect the output of one command as the input to another command 11.2 example: how many reference entries are at the start of the Genbank file? [sasquatch:downloads] ➤ grep REF NC_000913.prefix.txt ... REFERENCE 15 (bases 1 to 4639675) COMMENT PROVISIONAL REFSEQ: This record has not yet been subject to final RKKIRNEQRFASLDELKAQIARDELTAREFFGLTKPA" ... [sasquatch:downloads] ➤ egrep '^REF' NC_000913.prefix.txt REFERENCE 1 (bases 1 to 4639675) REFERENCE 2 (bases 1 to 4639675) REFERENCE 3 (bases 1 to 4639675) ... [sasquatch:downloads] ➤ egrep '^REF' NC_000913.prefix.txt | wc 15 90 540.
Recommended publications
  • Motor Vehicle Division Prestige License Plate Application
    For State or County use only: Denied Refund Form MV-9B (Rev. 08-2017) Web and MV Manual Georgia Department of Revenue - Motor Vehicle Division Prestige License Plate Application ______________________________________________________________________________________ Purpose of this Form: This form is to be used by a vehicle owner to request the manufacture of a Special Prestige (Personalized) License Plate. This form should not be used to record a change of ownership, change of address, or change of license plate classification. How to submit this form: After reviewing the MV-9B form instructions, this fully completed form must be submitted to your local County tag office. Please refer to our website at https://mvd.dor.ga.gov/motor/tagoffices/SelectTagOffice.aspx to locate the address(es) for your specific County. OWNER INFORMATION First Name Middle Initial Last Name Suffix Owners’ Full Legal Name: Mailing Address: City: State: Zip: Telephone Number: Owner(s)’ Full Legal Name: First Name Middle Initial Last Name Suffix If secondary Owner(s) are listed Mailing Address: City: State: Zip: Telephone Number: VEHICLE INFORMATION Vehicle Identification Number (VIN): Year: Make: Model: LICENSE PLATE COMBINATION Private Passenger Vehicle (Includes Motor Home and Non-Commercial Trailer) Note: Private passenger vehicles cannot exceed seven (7) letters and/or numbers including spaces. Meaning: ___________________________ Meaning: ___________________________ Meaning: ___________________________ (Required) (Required) (Required) Motorcycle Note: Motorcycles cannot exceed six (6) letters and/or numbers including spaces. Meaning: ___________________________ Meaning: ___________________________ Meaning: ___________________________ (Required) (Required) (Required) Note: No punctuation or symbols are allowed on a license plate. Only letters, numbers, and spaces are allowed. I request that a personal prestige license plate be manufactured.
    [Show full text]
  • Unix/Linux Command Reference
    Unix/Linux Command Reference .com File Commands System Info ls – directory listing date – show the current date and time ls -al – formatted listing with hidden files cal – show this month's calendar cd dir - change directory to dir uptime – show current uptime cd – change to home w – display who is online pwd – show current directory whoami – who you are logged in as mkdir dir – create a directory dir finger user – display information about user rm file – delete file uname -a – show kernel information rm -r dir – delete directory dir cat /proc/cpuinfo – cpu information rm -f file – force remove file cat /proc/meminfo – memory information rm -rf dir – force remove directory dir * man command – show the manual for command cp file1 file2 – copy file1 to file2 df – show disk usage cp -r dir1 dir2 – copy dir1 to dir2; create dir2 if it du – show directory space usage doesn't exist free – show memory and swap usage mv file1 file2 – rename or move file1 to file2 whereis app – show possible locations of app if file2 is an existing directory, moves file1 into which app – show which app will be run by default directory file2 ln -s file link – create symbolic link link to file Compression touch file – create or update file tar cf file.tar files – create a tar named cat > file – places standard input into file file.tar containing files more file – output the contents of file tar xf file.tar – extract the files from file.tar head file – output the first 10 lines of file tar czf file.tar.gz files – create a tar with tail file – output the last 10 lines
    [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]
  • Data Transformation Language (DTL)
    DTL Data Transformation Language Phillip H. Sherrod Copyright © 2005-2006 All rights reserved www.dtreg.com DTL is a full programming language built into the DTREG program. DTL makes it easy to generate new variables, transform and combine input variables and select records to be used in the analysis. Contents Contents...................................................................................................................................................3 Introduction .............................................................................................................................................6 Introduction to the DTL Language......................................................................................................6 Using DTL For Data Transformations ....................................................................................................7 The main() function.............................................................................................................................7 Global Variables..................................................................................................................................8 Implicit Global Variables ................................................................................................................8 Explicit Global Variables ................................................................................................................9 Static Global Variables..................................................................................................................11
    [Show full text]
  • PS TEXT EDIT Reference Manual Is Designed to Give You a Complete Is About Overview of TEDIT
    Information Management Technology Library PS TEXT EDIT™ Reference Manual Abstract This manual describes PS TEXT EDIT, a multi-screen block mode text editor. It provides a complete overview of the product and instructions for using each command. Part Number 058059 Tandem Computers Incorporated Document History Edition Part Number Product Version OS Version Date First Edition 82550 A00 TEDIT B20 GUARDIAN 90 B20 October 1985 (Preliminary) Second Edition 82550 B00 TEDIT B30 GUARDIAN 90 B30 April 1986 Update 1 82242 TEDIT C00 GUARDIAN 90 C00 November 1987 Third Edition 058059 TEDIT C00 GUARDIAN 90 C00 July 1991 Note The second edition of this manual was reformatted in July 1991; no changes were made to the manual’s content at that time. New editions incorporate any updates issued since the previous edition. Copyright All rights reserved. No part of this document may be reproduced in any form, including photocopying or translation to another language, without the prior written consent of Tandem Computers Incorporated. Copyright 1991 Tandem Computers Incorporated. Contents What This Book Is About xvii Who Should Use This Book xvii How to Use This Book xvii Where to Go for More Information xix What’s New in This Update xx Section 1 Introduction to TEDIT What Is PS TEXT EDIT? 1-1 TEDIT Features 1-1 TEDIT Commands 1-2 Using TEDIT Commands 1-3 Terminals and TEDIT 1-3 Starting TEDIT 1-4 Section 2 TEDIT Topics Overview 2-1 Understanding Syntax 2-2 Note About the Examples in This Book 2-3 BALANCED-EXPRESSION 2-5 CHARACTER 2-9 058059 Tandem Computers
    [Show full text]
  • Standard TECO (Text Editor and Corrector)
    Standard TECO TextEditor and Corrector for the VAX, PDP-11, PDP-10, and PDP-8 May 1990 This manual was updated for the online version only in May 1990. User’s Guide and Language Reference Manual TECO-32 Version 40 TECO-11 Version 40 TECO-10 Version 3 TECO-8 Version 7 This manual describes the TECO Text Editor and COrrector. It includes a description for the novice user and an in-depth discussion of all available commands for more advanced users. General permission to copy or modify, but not for profit, is hereby granted, provided that the copyright notice is included and reference made to the fact that reproduction privileges were granted by the TECO SIG. © Digital Equipment Corporation 1979, 1985, 1990 TECO SIG. All Rights Reserved. This document was prepared using DECdocument, Version 3.3-1b. Contents Preface ............................................................ xvii Introduction ........................................................ xix Preface to the May 1985 edition ...................................... xxiii Preface to the May 1990 edition ...................................... xxv 1 Basics of TECO 1.1 Using TECO ................................................ 1–1 1.2 Data Structure Fundamentals . ................................ 1–2 1.3 File Selection Commands ...................................... 1–3 1.3.1 Simplified File Selection .................................... 1–3 1.3.2 Input File Specification (ER command) . ....................... 1–4 1.3.3 Output File Specification (EW command) ...................... 1–4 1.3.4 Closing Files (EX command) ................................ 1–5 1.4 Input and Output Commands . ................................ 1–5 1.5 Pointer Positioning Commands . ................................ 1–5 1.6 Type-Out Commands . ........................................ 1–6 1.6.1 Immediate Inspection Commands [not in TECO-10] .............. 1–7 1.7 Text Modification Commands . ................................ 1–7 1.8 Search Commands .
    [Show full text]
  • Attachment B Portsmouth Naval Shipyard Utility Locating Procedures
    SECTION 01 35 26 – ATTACHMENT B PORTSMOUTH NAVAL SHIPYARD UTILITY LOCATING PROCEDURES LOCATION OF UNDERGROUND FACILITIES B1.1 General Excavation or ground penetrating work is defined as any operation in which earth, rock or other material below ground is moved or otherwise displaced, by means of power and hand tools, power equipment which includes grading, trenching, digging, boring, auguring, tunneling, scraping and cable or pipe driving except tilling of soil, gardening or displacement of earth, rock or other material for agricultural purposes. Removal of bituminous concrete pavement or concrete is not considered excavation Ground penetrating work may include but is not limited to installing fence posts, probes, borings, piles, sign posts, stakes or anchor rods of any kind that penetrates the soil more than 3”. The “Excavator” is defined as the person directly responsible for performing the excavation or ground penetrating work. B1.2 Underground Utilities Location The Contractor/Excavator shall fully comply with the State of Maine “DIG SAFE “law (Title 23, MRSA 3360-A). Existing underground utilities shown on the plans are based on PNS Yard Plates and are shown in their approximate locations only. The Excavator shall pre-mark the excavation area in “White Paint Only”. (Field notes may be done in Pink paint). The Excavator shall notify “DIG SAFE” (1-888-344-7233) at least within 14calendar days, but no more than 30 calendar days prior to the commencement of the excavation or ground penetrating activity. The Excavator shall prepare a PWD ME Dig Safe Utility Locate Request Format least within 14 calendar days prior to the commencement of the excavation or ground penetrating activity and submit the Form to the Contracting Officer.
    [Show full text]
  • GNU Findutils Finding Files Version 4.8.0, 7 January 2021
    GNU Findutils Finding files version 4.8.0, 7 January 2021 by David MacKenzie and James Youngman This manual documents version 4.8.0 of the GNU utilities for finding files that match certain criteria and performing various operations on them. Copyright c 1994{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, no Front-Cover Texts, and 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 1.1 Scope :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Overview ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2 Finding Files ::::::::::::::::::::::::::::::::::::: 4 2.1 find Expressions ::::::::::::::::::::::::::::::::::::::::::::::: 4 2.2 Name :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 2.2.1 Base Name Patterns ::::::::::::::::::::::::::::::::::::::: 5 2.2.2 Full Name Patterns :::::::::::::::::::::::::::::::::::::::: 5 2.2.3 Fast Full Name Search ::::::::::::::::::::::::::::::::::::: 7 2.2.4 Shell Pattern Matching :::::::::::::::::::::::::::::::::::: 8 2.3 Links ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 2.3.1 Symbolic Links :::::::::::::::::::::::::::::::::::::::::::: 8 2.3.2 Hard Links ::::::::::::::::::::::::::::::::::::::::::::::: 10 2.4 Time
    [Show full text]
  • (FLAG) System Technical Frequently Asked Questions and Filing Tips December 20, 2019
    Foreign Labor Application Gateway (FLAG) System Technical Frequently Asked Questions and Filing Tips December 20, 2019 QUESTION: When I take an action to update my initiated Form ETA-9142B (e.g., change number of workers requested, upload a replacement supporting document), the FLAG System does not appear to save my changes. Is there a technical problem with FLAG users updating initiated applications? ANSWER: The FLAG Help Desk Team acknowledges there is a technical glitch preventing FLAG users from saving changes or updates to the Form ETA-9142B when the application is in initiated status and where information is already entered into and saved on Appendix C (Foreign Labor Recruiter Information). However, there is a simple workaround to this technical glitch. We recommend that FLAG account users follow these steps to successfully save changes or updates to an initiated Form ETA-9142B application that also contains information on Appendix C: 1. Click “Edit” from the initiated cases table for the Form ETA-9142B application you wish to change or update. 2. Once the system loads the application you selected, immediately navigate to section “Appendix C – Foreign Labor Recruiter Information”. 3. After successfully navigating to the Appendix C section screen, navigate to any section(s) and field(s) of the Form ETA-9142B that you wish to update and enter your changes or upload your replacement supporting documentation – they will be saved successfully. 4. Repeat steps 1-3 above any time you open an initiated Form ETA-9142B application containing information on Appendix C to successfully make changes or updates. If you have not yet initiated your application, we recommend that FLAG users complete Form ETA-9142B as normal, but begin completing the Appendix C as one of the last steps before performing a final review and submitting the application for processing.
    [Show full text]
  • UNIX Reference Card Create a Directory Called Options: -I Interactive Mode
    File System Manipulation Move (Rename) Files and Directories mv present-filename new-filename to rename a file Create (or Make) a Directory mv source-filename destination-directory to move a file into another directory mkdir directory-name directory-name UNIX Reference Card create a directory called options: -i interactive mode. Must confirm file overwrites. Anatomy of a Unix Command Look at a File Copy Files more filename man display file contents, same navigation as cp source-filename destination-filename to copy a file into command-name -option(s) filename(s) or arguments head filename display first ten lines of a file another file tail filename display last ten lines of a file Example: wc -l sample cp source-filename destination-directory to copy a file into another directory : options options: The first word of the command line is usually the command name. This -# replace # with a number to specify how many lines to show is followed by the options, if any, then the filenames, directory name, or -i interactive mode. Must confirm overwrites. Note: this other arguments, if any, and then a RETURN. Options are usually pre- option is automatically used on all IT’s systems. -R recursive delete ceded by a dash and you may use more than one option per command. List Files and Directories The examples on this reference card use bold case for command names Remove (Delete) Files and Directories and options and italics for arguments and filenames. ls lists contents of current directory ls directory-name list contents of directory rm filename to remove a file rmdir directory-name to remove an Important Note about UNIX Commands empty directory : options options: -a list all files including files that start with “.” UNIX commands are case sensitive.
    [Show full text]
  • Assembly Language Programming: ARM Cortex-M3
    Assembly Language Programming Assembly Language Programming ARM Cortex-M3 Vincent Mahout First published 2012 in Great Britain and the United States by ISTE Ltd and John Wiley & Sons, Inc. Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms and licenses issued by the CLA. Enquiries concerning reproduction outside these terms should be sent to the publishers at the undermentioned address: ISTE Ltd John Wiley & Sons, Inc. 27-37 St George’s Road 111 River Street London SW19 4EU Hoboken, NJ 07030 UK USA www.iste.co.uk www.wiley.com © ISTE Ltd 2012 The rights of Vincent Mahout to be identified as the author of this work have been asserted by him in accordance with the Copyright, Designs and Patents Act 1988. ____________________________________________________________________________________ Library of Congress Cataloging-in-Publication Data Mahout, Vincent. Assembly language programming : ARM Cortex-M3 / Vincent Mahout. p. cm. Includes bibliographical references and index. ISBN 978-1-84821-329-6 1. Embedded computer systems. 2. Microprocessors. 3. Assembler language (Computer program language) I. Title. TK7895.E42M34 2012 005.2--dc23 2011049418 British Library Cataloguing-in-Publication Data A CIP record for this book is available from the British Library ISBN: 978-1-84821-329-6 Printed and bound in Great Britain by CPI Group (UK) Ltd., Croydon, Surrey CR0 4YY Table of Contents Preface ..........................................
    [Show full text]
  • Exercise 9: Getting More Advanced with the Command Line
    Exercise 9: Getting more advanced with the command line Hanne Munkholm <[email protected]> IT University of Copenhagen August 17, 2005 1 File ownership and access control • A user on a Linux system belong to one or more groups. On a Fedora system, each user has a group for himself, with the same name as his user name. Users can be organized in more meaningful groups by the system administrator. A user’s files are protected from the other users, and the system files are protected from all the ordinary users. The system administrator on a machine has a special user account called “root”, from which he has access to all the files on the system. • All files on a Linux system are owned by a user and a group. Create a new file with the touch command, and look at it with ls -l: $ touch linuxtest.txt $ ls -l linuxtest.txt -rw-rw-r-- 1 hm hm 0 Jan 28 15:46 linuxtest.txt Starting from the right, the fields are: File name, time and date of creation, file size (here it is zero because we just created it with the touch command), group and user owning the file (both “hm” in this case), link count, and file permissions. • Let us have a closer look at the file permissions. It consists of four parts: - rwx rwx rwx user group other The first part says something about the file type. In the example, it is a minus sign, which means an ordinary file. It can also be a “d” for directory, an “l” for symbolic link, a “b” or a “c” for different kind of devices, etc.
    [Show full text]