Example: biology

Command-line Bootcamp - University of California, …

This work is licensed under a Creative Commons Attribution International License. Please sendfeedback, questions, money, or abuse to BootcampKeith BradnamUC Davis Genome CenterVersion 2015 12 03 This Bootcamp is intended to provide the reader with a basic overview of essential Unix/ linux commandsthat will allow them to navigate a file system and move, copy, edit files. It will also introduce a brief overviewof some power commands in Unix. It was orginally developed as part of a Bioinformatics Core Workshoptaught at UC Davis (Using the linux Command-line for Analysis of High Throughput Sequence Data).

Command-line Bootcamp Keith Bradnam UC Davis Genome Center ... (Using the Linux Command-Line for Analysis of High Throughput Sequence Data).

Tags:

  Linux, Line, Command, The linux command line, Command line bootcamp, Bootcamp

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Command-line Bootcamp - University of California, …

1 This work is licensed under a Creative Commons Attribution International License. Please sendfeedback, questions, money, or abuse to BootcampKeith BradnamUC Davis Genome CenterVersion 2015 12 03 This Bootcamp is intended to provide the reader with a basic overview of essential Unix/ linux commandsthat will allow them to navigate a file system and move, copy, edit files. It will also introduce a brief overviewof some power commands in Unix. It was orginally developed as part of a Bioinformatics Core Workshoptaught at UC Davis (Using the linux Command-line for Analysis of High Throughput Sequence Data).

2 The Unix operating system has been around since 1969. Back then there was no such thing as a graphicaluser interface. You typed everything. It may seem archaic to use a keyboard to issue commands today, butit s much easier to automate keyboard tasks than mouse tasks. There are several variants of Unix (includingLinux), though the differences do not matter much for most basic , the raw output of biological research exists as in silico data, usually in the form of large text is particularly suited to working with such files and has several powerful (and flexible) commands thatcan process your data for you.

3 The real strength of learning Unix is that most of these commands can becombined in an almost unlimited fashion. So if you can learn just five Unix commands, you will be able to doa lot more than just five examples that you are meant to type into a terminal window will be shown indented in aconstant-width font, -lrhSometimes the accompanying text will include a reference to a Unix command . Any such text will also be in aconstant-width, boxed font. the pwd command time to time this documentation will contain web links to pages that will help you find out more aboutcertain Unix commands.

4 Usually, the first mention of a command or function will be a hyperlink to or critical points will be styled like so:This is an important point!IntroductionWhy Unix?Typeset ConventionsThe lessons from this point onwards will assume very little apart from the following:1. You have access to a Unix/ linux system2. You know how to launch a terminal program on that system3. You have a home directory where you can create/edit new filesIn the following documentation, we will also assume that the logged in user has a username ubuntu and thehome directory is located at /home/ubuntu.

5 AssumptionsA terminal is the common name for the program that does two main things. It allows you to type input to thecomputer ( run programs, move/view files etc.) and it allows you to see output from those programs. AllUnix machines will have a terminal program the terminal application. You should now see something that looks like the following:Terminal applicationThere will be many situations where it will be useful to have multiple terminals open and it will be a matter ofpreference as to whether you want to have multiple windows, or one window with multiple tabs (there aretypically keyboard shortcuts for switching between windows, or moving between tabs).

6 1. The TerminalIt s important to note that you will always be inside a single directory when using the terminal. The defaultbehavior is that when you open a new terminal you start in your own home directory (containing files anddirectories that only you can modify). To see what files and directories are in our home directory, we need touse the ls command . This command lists the contents of a directory. If we run the ls command we shouldsee something like:ubuntu@:~$ lscommand_line_course linux_bootcampubuntu@:~$There are four things that you should note here:1.

7 You will probably see different output to what is shown here, it depends on your computer setup. Don tworry about that for The ubuntu@:~$ text that you see is the Unix command prompt. In this case, it contains a user name( ubuntu ) and the name of the current directory ( ~ , more on that later). Note that the command promptmight not look the same on different Unix systems. In this case, the $ sign marks the end of the The output of the ls command lists two things. In this case, they are both directories, but they couldalso be files.

8 We ll learn how to tell them apart later on. These directories were created as part of aspecific course that used this Bootcamp material. You will therefore probably see something verydifferent on your own After the ls command finishes it produces a new command prompt, ready for you to type your ls command is used to list the contents of any directory, not necessarily the one that you are currentlyin. Try the following:ubuntu@:~$ ls command_line_course galaxy lost+found refsubuntu@:~$ ls /etc/perlCPAN Net XML2. Your first Unix commandLooking at directories from within a Unix terminal can often seem confusing.

9 But bear in mind that thesedirectories are exactly the same type of folders that you can see if you use any graphical file browser. Fromthe root level ( / ) there are usually a dozen or so directories. You can treat the root directory like any other, you can list its contents:ubuntu@:~$ ls /bin dev lib64 mnt root software tmp vmlinuzboot etc lost+found opt run srv usr home lib media proc sbin sys varYou might notice some of these names appearing in different colors.

10 Many Unix systems will display files anddirectories differently by default. Other colors may be used for special types of files. When you log in to acomputer you are working with your files in your home directory, and this is often inside a directory called users or home .3: The Unix treeThere may be many hundreds of directories on any Unix machine, so how do you know which one you arein? The command pwd will Print the Working Directory and that s pretty much all this command does:ubuntu@:~$ pwd/home/ubuntuWhen you log in to a Unix computer, you are typically placed into your home directory.


Related search queries