Linux for Scientists Or: What Can I Do at the Black Screen?

Total Page:16

File Type:pdf, Size:1020Kb

Linux for Scientists Or: What Can I Do at the Black Screen? Linux for scientists or: What can I do at the black screen? Lennart C. Karssen PolyΩmica, The Netherlands [email protected] June 2016* * Git information: Hash: 5ddb1d6 Date: 2016-06-10 0 01 1 010 010 0 0 01 10 10 10 1 0 010 10 1 1 0 1 1 1 0 0 1 0 01 0 1 0 0 1 0 10 0 1 0 1 1 1 0 1 1 1 01 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 0 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 0 11 0 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 11 0 1 0 0 0 1 1 0 0 0 0 01 0 1 0 0 01 1 1 01 0 1 1 0 0 1 1 1 0 1 1 1 11 0 1 0 0 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 1 0 0101111 10100001001011 1 1011 1 111011 0 0 0 0101 1 0 0 10 1 00 1 101 1 1 101 0 1 10 1 01 1 1 00 0 00 1 0 0 1 1 1 11 1 0 1 1 010110101010 1 Contents Contents List of Tables x 1 Preface 3 1.1 About this book ........................... 4 1.2 Acknowledgements ......................... 5 2 What is Linux? 7 3 The basics 11 3.1 Logging in and out ......................... 12 3.2 Editors ................................. 13 3.3 The structure of Linux commands ................ 14 3.3.1 Exercises ........................... 17 3.4 Managing your account ...................... 19 3.5 Getting help ............................. 20 3.6 Working with files and directories ................ 21 3.6.1 Directories .......................... 24 3.6.2 Copying, moving, removing ................ 25 3.6.3 Wildcards .......................... 27 3.6.4 Exercises ........................... 28 3.7 Transferring files from one Linux machine to another .... 31 3.8 Pagers, or how to look at the contents of a file ........ 32 3.8.1 Exercises ........................... 33 3.9 Using compressed archives like .zip and tar.gz files ... 34 3.9.1 zip .............................. 35 3.9.2 gzip .............................. 35 3.9.3 tar .............................. 36 3.9.4 Exercises ........................... 36 3.10 File ownership and permissions ................. 37 3.10.1 Ownership .......................... 37 3.10.2 Permissions ......................... 38 3.11 Process management ........................ 39 3.11.1 Exercises ........................... 40 3.12 Miscellaneous commands ..................... 43 3.12.1 wget: downloading files to the server ......... 43 3.12.2 sort .............................. 44 3.12.3 uniq .............................. 46 iv Contents 3.12.4 wc: counting words and lines .............. 47 3.12.5 date .............................. 47 3.12.6 du: disk space usage .................... 48 3.12.7 Differences between files ................. 49 3.13 Input and output redirection ................... 51 3.13.1 Redirecting to and from files ............... 52 3.13.2 Redirecting output of one command to another ... 53 3.14 Aliases and creating your own commands ........... 55 4 Working with text files 61 4.1 Converting between Windows and Linux format ....... 62 4.1.1 Exercises ........................... 63 4.2 grep: finding text .......................... 64 4.2.1 Exercises ........................... 67 4.3 sed, the Stream EDitor ....................... 68 4.3.1 Exercises ........................... 69 4.4 cut: selecting columns ....................... 70 4.5 GAWK: more fun with columns .................. 71 4.5.1 Exercises ........................... 74 4.6 Putting it all together ........................ 76 4.6.1 Exercises ........................... 76 5 Writing Bash scripts 81 5.1 A simple script ............................ 82 5.2 Using variables ............................ 85 5.3 Using shell variables in GAWK ................... 89 5.4 Loops, for and while ....................... 90 5.5 if-clauses and tests ......................... 95 5.6 Dealing with errors in your script ................ 97 6 Working with the SGE queue system 103 6.1 Submitting jobs to the SGE queues ................ 104 6.1.1 Quick and dirty ....................... 105 6.1.2 Using a submission script ................ 105 6.1.3 Refinements to the submission script ......... 106 6.2 Monitoring progress ........................ 107 6.3 Deleting jobs from a queue .................... 108 v Contents 6.4 Getting info on a finished job ................... 109 6.5 Interactive jobs ........................... 111 6.6 Exercises ............................... 111 7 Good scripting practices, structured programming and data man- agement 117 7.1 Code layout .............................. 119 7.1.1 Indentation ......................... 119 7.1.2 Line length .......................... 120 7.1.3 Spaces ............................ 121 7.2 Comments .............................. 123 7.3 Variable names ........................... 124 7.4 File and directory names ..................... 124 7.5 Summary ............................... 125 8 Where to go from here? 129 8.1 More advanced topics ....................... 130 8.2 Further reading ........................... 131 A Answers to the exercises 135 B Reference Card of Basic Linux Commands 157 C List of acronyms 163 Bibliography 168 Index 172 vi 0 01 1 010 010 0 0 01 10 10 10 1 0 010 10 1 1 0 1 1 1 0 0 1 0 01 0 1 0 0 1 0 10 0 1 0 1 1 1 0 1 1 1 01 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 0 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 0 11 0 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 11 0 1 0 0 0 1 1 0 0 0 0 01 0 1 0 0 01 1 1 01 0 1 1 0 0 1 1 1 0 1 1 1 11 0 1 0 0 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 1 0 0101111 10100001001011 1 1011 1 111011 0 0 0 0101 1 0 0 10 1 00 1 101 1 1 101 0 1 10 1 01 1 1 00 0 00 1 0 0 1 1 1 11 1 0 1 1 010110101010 1 List of Tables List of Tables 3.1 Basic Emacs keyboard shortcuts.
Recommended publications
  • The Linux Command Line
    The Linux Command Line Fifth Internet Edition William Shotts A LinuxCommand.org Book Copyright ©2008-2019, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042. A version of this book is also available in printed form, published by No Starch Press. Copies may be purchased wherever fine books are sold. No Starch Press also offers elec- tronic formats for popular e-readers. They can be reached at: https://www.nostarch.com. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. Release History Version Date Description 19.01A January 28, 2019 Fifth Internet Edition (Corrected TOC) 19.01 January 17, 2019 Fifth Internet Edition. 17.10 October 19, 2017 Fourth Internet Edition. 16.07 July 28, 2016 Third Internet Edition. 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. Table of Contents Introduction....................................................................................................xvi Why Use the Command Line?......................................................................................xvi
    [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]
  • Release 0.11 Todd Gamblin
    Spack Documentation Release 0.11 Todd Gamblin Feb 07, 2018 Basics 1 Feature Overview 3 1.1 Simple package installation.......................................3 1.2 Custom versions & configurations....................................3 1.3 Customize dependencies.........................................4 1.4 Non-destructive installs.........................................4 1.5 Packages can peacefully coexist.....................................4 1.6 Creating packages is easy........................................4 2 Getting Started 7 2.1 Prerequisites...............................................7 2.2 Installation................................................7 2.3 Compiler configuration..........................................9 2.4 Vendor-Specific Compiler Configuration................................ 13 2.5 System Packages............................................. 16 2.6 Utilities Configuration.......................................... 18 2.7 GPG Signing............................................... 20 2.8 Spack on Cray.............................................. 21 3 Basic Usage 25 3.1 Listing available packages........................................ 25 3.2 Installing and uninstalling........................................ 42 3.3 Seeing installed packages........................................ 44 3.4 Specs & dependencies.......................................... 46 3.5 Virtual dependencies........................................... 50 3.6 Extensions & Python support...................................... 53 3.7 Filesystem requirements........................................
    [Show full text]
  • Ubuntu Server Guide Basic Installation Preparing to Install
    Ubuntu Server Guide Welcome to the Ubuntu Server Guide! This site includes information on using Ubuntu Server for the latest LTS release, Ubuntu 20.04 LTS (Focal Fossa). For an offline version as well as versions for previous releases see below. Improving the Documentation If you find any errors or have suggestions for improvements to pages, please use the link at thebottomof each topic titled: “Help improve this document in the forum.” This link will take you to the Server Discourse forum for the specific page you are viewing. There you can share your comments or let us know aboutbugs with any page. PDFs and Previous Releases Below are links to the previous Ubuntu Server release server guides as well as an offline copy of the current version of this site: Ubuntu 20.04 LTS (Focal Fossa): PDF Ubuntu 18.04 LTS (Bionic Beaver): Web and PDF Ubuntu 16.04 LTS (Xenial Xerus): Web and PDF Support There are a couple of different ways that the Ubuntu Server edition is supported: commercial support and community support. The main commercial support (and development funding) is available from Canonical, Ltd. They supply reasonably- priced support contracts on a per desktop or per-server basis. For more information see the Ubuntu Advantage page. Community support is also provided by dedicated individuals and companies that wish to make Ubuntu the best distribution possible. Support is provided through multiple mailing lists, IRC channels, forums, blogs, wikis, etc. The large amount of information available can be overwhelming, but a good search engine query can usually provide an answer to your questions.
    [Show full text]
  • Ubuntu Server Guide Ubuntu Server Guide Copyright © 2010 Canonical Ltd
    Ubuntu Server Guide Ubuntu Server Guide Copyright © 2010 Canonical Ltd. and members of the Ubuntu Documentation Project3 Abstract Welcome to the Ubuntu Server Guide! It contains information on how to install and configure various server applications on your Ubuntu system to fit your needs. It is a step-by-step, task-oriented guide for configuring and customizing your system. Credits and License This document is maintained by the Ubuntu documentation team (https://wiki.ubuntu.com/DocumentationTeam). For a list of contributors, see the contributors page1 This document is made available under the Creative Commons ShareAlike 2.5 License (CC-BY-SA). You are free to modify, extend, and improve the Ubuntu documentation source code under the terms of this license. All derivative works must be released under this license. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE AS DESCRIBED IN THE DISCLAIMER. A copy of the license is available here: Creative Commons ShareAlike License2. 3 https://launchpad.net/~ubuntu-core-doc 1 ../../libs/C/contributors.xml 2 /usr/share/ubuntu-docs/libs/C/ccbysa.xml Table of Contents 1. Introduction ........................................................................................................................... 1 1. Support .......................................................................................................................... 2 2. Installation ............................................................................................................................
    [Show full text]
  • UNIX/LINUX Command Reference Sheet
    UNIX/LINUX Command Reference Sheet File Commands Process Management cat – concatenates and displays files at/batch– execute commands at a later time cat > file – places standard input into file bg – lists stopped or background jobs; resume a cd – change current directory stopped job in the background cmp – compares two files cron – clock daemon that executes commands at cp – copies a file or a directory specified dates and times cut – removes columns or fields from the specified crontab – modifies the user's crontab file, which is file(s) used by cron diff – displays line‐by‐line differences between two fg – brings the specified job to foreground text files kill pid – kill process id pid head – displays the first lines of the specified file(s) killall proc – kill all processes named proc1 join – joins two files nice – invoke a command with an altered scheduling jot – print sequential or random data priority ln – make hard or symbolic links to files ps – display your currently active processes ls -al – formatted listing with hidden files renice – alter priority of running processes ls – directory listing top – display all running processes mkdir dir – create a directory dir more/less – output the contents of the specified File & Group Permissions file(s) in pages chmod octal file – change the permissions of mv – rename or move a file file to octal, which can be found separately for nl – put line numbers on a file user, group, and world by adding: od – sequentially copies each file to standard output, • 4 – read (r) displaying it according to the specified arguments; for • 2 – write (w) example, in hexadecimal (often useful in conjunction • 1 – execute (x) with diff) Examples: paste – merge same lines of several files or chmod 777 – read, write, execute for all subsequent lines of one file chmod 755 – rwx for owner, rx for group and world pr – produces a printed listing of one or more files For more options, see man chmod.
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Second Internet Edition William E. Shotts, Jr. A LinuxCommand.org Book Copyright ©2008-2013, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, 171 Second Street, Suite 300, San Fran- cisco, California, 94105, USA. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. This book is also available in printed form, published by No Starch Press and may be purchased wherever fine books are sold. No Starch Press also offers this book in elec- tronic formats for most popular e-readers: http://nostarch.com/tlcl.htm Release History Version Date Description 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. 09.11 November 19, 2009 Fourth draft with almost all reviewer feedback incorporated and edited through chapter 37. 09.10 October 3, 2009 Third draft with revised table formatting, partial application of reviewers feedback and edited through chapter 18. 09.08 August 12, 2009 Second draft incorporating the first editing pass. 09.07 July 18, 2009 Completed first draft. Table of Contents Introduction....................................................................................................xvi
    [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]
  • Discussion Slides
    Discussion Session 03 Project 1 | Framing | Parsing Overview 1. Framing and Parsing 2. Generating HTTP Requests 3. Modular Server Code Calculator Example - Server Calculator Server - 1. Create a socket - socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) 2. Bind the socket - bind(servSock, (struct sockaddr *) &servAddr, sizeof(servAddr) 3. Start Listening - listen(servSock, MAX_PENDING) 4. Loop and Accept Connections - accept(servSock, (struct sockaddr *) &echoClntAddr, &clntLen) Notes: 1. clntLen should be an unsigned int, or you can cast it to (socklen_t *) 2. bind() is also a function in std namespace. Use ::bind() for the sockets bind function Calculator Example - Client Request Format - ADD 10\r\n SUB 5\r\n SET 20\r\n ADD 30\r\n \r\n The server applies these operations on an accumulator which is set to 0 initially Framing Framing - Extracting a complete message based on delimiters Request1\r\n\r\nRequest2\r\n\r\nRequest3\r\n\r\nRequest4 Separate out into Request1, Request2, Request3 and Request4 Generating HTTP Request A sample HTTP request on TritonHTTP Spec - GET / HTTP/1.1<CR><LF> Host: www.cs.ucsd.edu<CR><LF> User-Agent: MyTester v1.0<CR><LF> Cookie: 123<CR><LF> <CR><LF> Here <CR> - Carriage Return (\r), <LF> - Line Feed (\n) Creating HTTP Request Script - unix2dos.sh #!/bin/bash if [ "$#" -ne 2 ]; then echo "Usage: $0 input-file.txt output-file.txt" exit 1 fi if [ ! -f $1 ]; then echo "File $1 not found" exit 2 fi sed 's/$'"/`echo \\\r`/" < $1 > $2 sh unix2dos.sh input_file.txt output_file.txt Creating HTTP Request - Example 1. Create a request in a text editor and save the file 2.
    [Show full text]
  • UNIX Commands Login and Exit Yppasswd Change Password Rlogin
    UNIX Commands Login and Exit yppasswd Change password rlogin machine Log into a remote machine telnet machine Log into a remote machine exit End a shell session Ctrl-D End shell session logout Log out of remote session Help man command Describes the command man -k keyword Search for keyword Display directory listing ls Display directory listing ls -l Display access permissions ls -a Display hidden files ls -d Display directory ls -t Display files sorted by time ls dir Display contents of directory ls file Display file ls ???* Display all files with more than 3 characters in name Change, Create, Remove Directories pwd Display current directory cd Change to your home directory cd .. Change to parent directory cd dir Change to another directory mkdir dir Create a new directory rmdir dir Remove a directory (must be empty) rm -r dir Remove a directory and everything within it Create, Copy, Move, Delete Files touch file Create an empty file cp src-file dst-file Copy a file to another file cp src-file dst-dir Copy a file to a directory cp -r * dst-dir Copy all files and sub-directories to another directory mv src-file dst-file Move a file to another file (renames file) mv src-file dst-dir Move a file to another directory mv src-dir dst-dir Move a directory to another directory Note: filenames can be up to 255 characters long but should not contain special characters, e.g., $ * [ ] & < > Change file permissions chmod o+r file Change file to allow read access to anyone chown username file Change onwer of file to username chgrp new-grp file Change
    [Show full text]
  • July/August 2021
    July/August 2021 A Straight Path to the FreeBSD Desktop Human Interface Device (HID) Support in FreeBSD 13 The Panfrost Driver Updating FreeBSD from Git ® J O U R N A L LETTER E d i t o r i a l B o a r d from the Foundation John Baldwin FreeBSD Developer and Chair of ne of the myths surrounding FreeBSD is that it • FreeBSD Journal Editorial Board. is only useful in server environments or as the Justin Gibbs Founder of the FreeBSD Foundation, • President of the FreeBSD Foundation, foundation for appliances. The truth is FreeBSD and a Software Engineer at Facebook. O is also a desktop operating system. FreeBSD’s base sys- Daichi Goto Director at BSD Consulting Inc. tem and packages include device drivers for modern • (Tokyo). graphics adapters and input devices. Consistent with Tom Jones FreeBSD Developer, Internet Engineer FreeBSD’s role as a toolkit, FreeBSD supports a variety • and Researcher at the University of Aberdeen. of graphical interfaces ranging from minimalist window managers to full-featured desktop environments. The Dru Lavigne Author of BSD Hacks and • The Best of FreeBSD Basics. first article in this issue walks through several of these Michael W Lucas Author of more than 40 books including options explaining how users can tailor their desktop • Absolute FreeBSD, the FreeBSD to their needs. It also provides pointers to downstream Mastery series, and git commit murder. projects which build an integrated desktop system on Ed Maste Senior Director of Technology, top of FreeBSD. The next two articles dig into the details • FreeBSD Foundation and Member of the FreeBSD Core Team.
    [Show full text]
  • Designing Custom Gene Expression Arrays Using Earray
    eArray - custom microarray design web tool Gene Expression design tutorial Page 1 March 2007 Probe Design for Designing Custom Custom GX Arrays GX Arrays Using eArray 5.0 Print what you want when you want it Group/Presentation Title Agilent Confidential Page 2 Month ##, 200X eArray Overview Array Creation Process eArray provides an easy way of managing the array creation process. We are here! Search Agilent Probes Create Create Probe Submit to Microarray Order Arrays Groups Manufacturing Designs Upload Probes Download Design files Page 3 March 2007 Outline • Access your targeted organism’s transcriptome sequence from NCBI or other. •Format the data as needed into a standard FASTA format. •In eArray, select a design methodology and parameters • Uploading the transcriptome file • Download the results from eArray • Review the probe statistic results for possible culling •Create a probe group. •Create the microarray design. Page 4 March 2007 Access the Transcriptome of your Target Organism ex: Anopheles gambiae (African malaria mosquito) UniGene sequences downloaded from NCBI UniGene Build #35: Page 5 March 2007 Retrieve the file Gs.seq.uniq.gz from the NCBI unigene ftp repository (where Gs = Genus species) Page 6 March 2007 There are multiple links towards UniGene FTP site from the NCBI server The most direct way is to paste the link ftp://ftp.ncbi.nih.gov/repository/UniGene/ in your web browser. Alternatively, on the left lower corner of NCBI homepage, http://www.ncbi.nlm.nih.gov/, you will find a link “FTP sites”. Click it, you will be directed to a page with all FTP sites. The link, “UniGene”, leads you to the collection of all available UniGene sets.
    [Show full text]