[PDF] Workshop 1: Introduction to UNIX command-line





Previous PDF Next PDF



Introduction à lenvironnement Unix

— abrégé S.E. (en anglais operating system O.S.). — exemples : MS-DOS Windows (XP



Introduction to Unix and the X Window System

It has some nice advantages over a Microsoft Windows or Apple. Macintosh GUI primarily in being able to run over networks. Again



Introduction à Unix et à la programmation Shell

Introduction à Unix et à la programmation. Shell. Sylvain Baudry MS-DOSD Windows et Windows NT sont des m—rques déposées de Micro- soft Corp.



Chapter 4 Introduction to UNIX Systems Programming

Even though we focus in this book on UNIX the same concepts learned in this book can be adapted to other Operating. Systems such as Windows. 4.3 A Brief 



Introduction à Unix / Linux

30 avr. 2015 Ils sont justes utilisés pour les utilisateurs . Exemples de noms de fichiers: README .bashrc. Windows Buglist index.htm index.



Chapitre 2 - Introduction au système Unix/Linux

INTRODUCTION AU SYSTÈME UNIX/LINUX. Multics. Unics. Unix. Unix assembleur Windows. En 1991 le kernel Linux a rejoint le projet et on a appelé le tout.



Travaux Pratiques dintroduction à Unix

Vi et Vim (qui est libre) sont des éditeurs de texte présents dans la plupart des systèmes. UNIX et qui peuvent également être installés sous Windows.



Cours 1 : Introduction au syst`eme UNIX

10 janv. 2017 1 : Introduction Syst`emes/Services Unix ... Microsoft Windows (NT XP



Workshop 1: Introduction to UNIX command-line

Introduction to UNIX command-line. Peter Scott PhD



Correction TP dintroduction à Unix

Correction TP d'introduction à Unix. Première année DUT Informatique. —2013-2014—. Exercice 1. Connexion-Déconnexion. Ce premier exercice à pour but de vous 



Introduction à UNIX et Windows Introduction

Objectifs de l'enseignement : Connaitre et manipuler les concepts de base ( chiers processus) des systemes d'exploitation UNIX et Windows Savoir interagir avec ces systemes d'exploitation Pour Windows puis UNIX : Generalites sur le systeme d'exploitation Description du systeme de gestion des



UNIX vs Linux vs Windows: How They Compare - Spiceworks

Pr esentation d’UNIX Pr esentation globale d’UNIX (1) UNIX : Standard pour les syst emes d’exploitation Disponibilit e de nombreux utilitaires de manipulation de donn ees textuelles Facilit e de communication de donn ees entre di erents programmes Des types d’UNIX : Linux Solaris Dans le cadre du cours utilisation d’un UNIX : Linux

Workshop 1: Introduction to UNIX command-line

Workshop 1:

Introduction toUNIX command-line

Peter Scott, PhD | pscott17@ucla.edu

QCBFellow

Thanks to SergheiMangulfor base slides!

Peter Scott,PhD

pscott17@ucla.edu

ShafferLab

Department of Ecology and Evolutionary Biology

University of California, Los Angeles

Collaboratory Website

http://qcb.ucla.edu/collaboratory/

Workshop 1: Introduction to UNIX

commandline Day 1

Unix -Learning theessentials

Unix fundamentals, syntax,andusage

Day 2

Unixcommands

Day 3

Useful shellcommands

UNIX Shell Scripting

WhyUnix?

As biological data sets have grown larger and

biological problems have become more complex, the requirements for computing power have also grown.

Computers that can provide this power generally

WhyUnix?

information and gethelp

Unix is very stable ʹcomputers running

Unix almost never crash

manage extremely huge amounts ofdata

Most new bioinformatics software is

created forUnix

Command lineinterface

TopicCLIGUI

Due to a higher degreeof

memorizationandBecause a GUI ismuch familiarity neededformore visually intuitive,new

Easeoperation andnavigation,

users almost always pick up this interfacefaster command lineinterface than aCLI.

Command lineinterface

TopicCLIGUI

Users have more control

operating systems inaample access to theĮůĞ

Controlcommand lineinterface.

For example, userscan

and operating systems, advanced tasks maystill one location toanothercommand line.

Command lineinterface

TopicCLIGUI

Although manycommandGUI users have windows

that enable a user toview, control, manipulate, and toggle through multiple programs and folders at same time. line environmentsare capable ofmultitasking, ease and ability toview multiple things at onceon onescreen.

Command lineinterface

TopicCLIGUI

Command line usersonlyUsing both a mouseand

need to utilizetheirkeyboard to navigateand keyboards to navigateacontrol your operatingor

Speedthe interface. Additionally,

they oaen only needto

ĮůĞsystem is going tobe

much slower than execute a few linestosomeone who is workingin perform atask.a commandline.

Command lineinterface

TopicCLIGUI

Although A GUI enablesa

A command lineinterfaceuser to createshortcuts,

enables a user to scriptatasks, or othersimilar

Scriptingsequence of commands to

perform a task or executea actions, it doesn'teven come close incomparison program.to what isavailable through a commandline.

Command lineinterface

TopicCLIGUI

design and structure when it comes to performing same GUI, such as

Windows, can have

changes between each version. to navigate and usea command line, it'snot going to change as muchas

Diversitya new GUI. Althoughnew

commands maybe introduced, the original commands alwaysremain thesame.

Command lineinterface

TopicCLIGUI

The command lineallows

Although shortcut keyscan

help reduce the amount of times you have move from the keyboard to the mouse, you will still be moving much more between devices in aGUI. the user to keeptheir hands on thekeyboard, almost never touchingthe

Strainmouse. Moving back and

forth between akeyboard and mouse cancause additional strain andmay help contributeto

Carpal TunnelSyndrome.

Do biologists needto become

programmers? *provided inthe class *free and easy touse

Open a SSH program on yourcomputer

Type your username andpassword

sshpscott17@hoffman2.idre.ucla.edu pscott17@hoffman2.idre.ucla.edu's password:

Notice that when you type a password, nothing

shows up on the screen, this is for yoursecurity

Open SSHprogram

putty, Cygwin, Ubuntu for

Windows (new app Windows 10)

Terminal

sshpscott17@hoffman2.idre.ucla.edu

The UnixShell

A shell is a program that waits for you to type

a command and then executesit.

The UnixShell

A shell is a program that waits for you to type

a command and then executesit.

Uses a general basic syntax:

The UnixShell

A shell is a program that waits for you to type

a command and then executesit.

Uses a general basic syntax:

$ ls l *.txt Translates to: list (ls); modify display to long (-l); all text files (*.txt)

UnixFileSystem

Unix is cAsEsEnsItiVe!

/home/john/portfolio/ /home/mary/

Homedirectory

path

Hoffman2:/u/home/p/pscott17/project/

my homedirectory

Homedirectory

always start in your Homedirectory. projects or groups ofinformation cryptic names in your Homedirectory

Command:passwd

A very good idea after you got a defaultone.

[pscott17@login3 ~]$passwd

Changing password for userpscott17.

Please enter your currentpassword:

Command:pwd

To display current directory

[pscott17@login3 ~]$pwd /u/home/p/pscott17

Command:mkdir

To create a new directory use䇾mkdir䇿

[pscott17@login3 ~]$mkdirtest

If no error message is displayed

means the command was run successfully

Command:cd

cd changes your current workingdirectory [pscott17@login3 ~]$ cdtest [pscott17@login3 test]$pwd /u/home/p/pscott17/test

Command:cd

䇾~䇿㻌is the location of your homedirectory 䇾..䇿㻌is the location of the directory above the currentone pscott17 project /u/home/p/pscott17/project/ my homedirectory [pscott17@login3test]$ cd~ [pscott17 @login3 ~]$pwd /u/home/p/pscott17 [pscott17 @login3~]$ cd .. [pscott17@login3 s]$pwd /u/home/p [pscott17@login3 s]$cdpscott17/test /u/home/p/pscott17 to go back to previously entered commands, use the up and down arrows tabkey if you are stuck within a command/ process/program, try ctrl-Ͳnj(Mac) or ctrl-c (Linux/Windows) to terminateit [pscott17@login3~]$ cdtest [pscott17@login3test]$ mkdirnewdir [pscott17@login3 test]$cdnewdir pscott17@login3 newdir]$cd ..

Create a textĮůĞ

1.[pscott@login3 test]$ nanotest.txt

2.Type something (My first text file!).

3.Pressctrl-o (write out ʹthis saves the file).

4.Press ctrl-x (exit ʹthis will also give you options to save).

5.Lots of other text editors (vi is very popular ʹsteeper learning curve).

Command :ls

to list the files in the currentdirectory [pscott17@login3]$ls test.txt newdir

Command :ls

ls has manyoptions -l long list (display lots of info) -s sort by modification time -S sort by size -h human readable -r reverse order

Options can be combined: ls -lh

[pscott17@login3 test]$ls newdirtest.txt pscott17@login3 test]$ls-l total8 drwxr-xr-x2pscott17 hbshaffe4096Sep809:35 newdir -rw-r--r--1pscott17 hbshaffe80Sep809:50test.txt [pscott17@login3 test]$ls-lh total8.0K drwxr-xr-x2pscott17 hbshaffe4.0KSep809:35 newdir -rw-r--r--1pscott17 hbshaffe80Sep809:50test.txt

How to knowmore?

Manual

Google

Command :man

displays manualpages ctrl-Ͳnjtoexit(mac) [pscott17@login3 test]$ manls q toexit(windows)

GeneralSyntax:*

䇾*䇿㻌can be used as a wildcard inUnix [pscott17@login3 test.txt test]$ls*txt [pscott17@login3 test.txt test]$lst*t [pscott17@login3test]$lst* test.txt

Displayingafile

cat less head tail

Command:cat

dumps an entire file to standardoutput good for displaying short, simplefiles [pscott17@login3 test]$ cattest.txt

My first txtfile!

Command:less

Scrolling through a file without a mouse

Up and downkeys

Scroll oneline

spaceor ctrl-b

Scroll onepage

ctrl-Ͳnjtoexit(mac) qtoexit(windows) -300 [pscott17@login3test]$ printf\ [pscott17@login3test]$headlarge.txt 1 2 9 10 [pscot17@login3test]$taillarge.txt 291
292
300
[pscott17@login3test]$tail-n 3large.txt 298
299
300

FileCommands

Copying ĂĮůĞ͗cp

Move or rename ĂĮůĞ͗mv

Remove ĂĮůĞ͗rm

There is NO going back!!!!

although see: Copy cp

Tocopy a file use cp

-ͲI (interactive) -Ͳf(force) -Ͳǀ(verbose) practice [pscott17@login3 test]$cp test.txt text1.txt [pscott17@login3 test]$ls large.txtnewdirtest1.txttest.txtest.txt [pscott17@login3 test]$mkdirnew [pscott17@login3 test]$cp r new new2 [pscott17@login3 test]$ls [pscott17@login3 test]$cp test.txt new2 [pscott17 @login3test]$ cp test.txt new2/test_new.txt [pscott17@login3 test]$ cdnew2 [pscott17@login3 new]$ ls test_new.txttest.txt

Command:mv

mv moves a file/directory to a differentlocation renames afile/directory [pscott17@login3 new2]$ cd.. [pscott17@login3 test]$pwd /u/home/p/pscott17/test [pscott17@login3 test]$mvtest1.txtnew [pscott17@login3test]$ mvtest.txttest_rename.txt [pscott17@login3 test]$ls large.txtnewnew2newdirtest_rename.txt test.tx [pscott17@login3test]$ mvtest.txnew/test2.txt

SymbolicLinks

Original

Link

Data on the harddisc

is a special kind of ĮůĞthat points to anotherĮůĞ ln existing ĮůĞfor which you want to create the symbolic linkname of the symboliclink

Good toknow

You can perform an operation on LINK_NAME, just as you could with theORIGINAL_FILE You can use normal ĮůĞmanagement commands (e.g., cp, rm) on the symboliclink.

Absolutepath

[pscott17@login3 new2]$cd new [pscott17@login3 new2]$ln -s /u/home/p/pscot17/test/new2/new2 [pscott17@login3 new2]$ ls [pscott17@login3 new2]$ less new2/test.txt

New name

Command:rm

to remove a file userm to remove a directory use rm-r Files and directories deleted with rm are gone forever and cannot be recovered!!! [pscott17@login3new]$ cd ~/test/new2 [pscott17@login3test]$ rmtest.txt [pscott17@login3test]$ cd .. [pscott17@login3 test]$rm-r new2 [pscott17@login3 test]$ ls large.txtnewnewdirtest_rename.txt

Good toknow

cpfile1 file2 new/ rmfile1 file2file27 cp/mv/rm can work with*: mv f*new/ rm rml*s rm*txt

Accidentalloss

Modify your personal Linuxenvironment

change or delete (Day 2)

Backup

compressed tarformat

Copy to your laptop/harddrive

new.tgznew/[pscott17@login3 test]$ tar -czvf [pscott17@login3 test]$ ls -l total12

Remote copying :scp

scp user@hoffman2.idre.ucla.edu:/./ Run scp from the local session of the terminal. To open a local session:

Control-Ͳto open a newtab

New tab be default corresponds to a local session

File locatedon

the laptop, in the current directory

Where on thecluster

willbe copied

File locatedon

the cluster, in the directory localFile remoteFile [users-MacBook-Air]$ scp pscott17@hoffman2.idre.ucla.edu:~/test/new.tar ./

Winscp

Filezilla

Lots of Mac/Linux folks use this too!!!

Winscp

Winscp

Clustername

Username

Password

Winscp

Laptop

quotesdbs_dbs33.pdfusesText_39
[PDF] Gap Analysis Rapport Liikanen et loi de séparation et de régulation des activités bancaires

[PDF] SCHEMA DEPARTEMENTAL DE DEVELOPPEMENT TOURISTIQUE DES VOSGES. ATELIER n 1 : «OTSI, vers un regroupement territorial des destinations touristiques?

[PDF] R èglement Intérieur. Article 1 : Objet. Article 2 : Destinataires. Article 3 : Conditions relatives au type de projets éligibles

[PDF] REPERES METHODOLOGIQUES

[PDF] MARCHE N emp 2014-2. Objets de la consultation :

[PDF] Séminaire : les transports collectifs favoriser la mobilité des personnes au quotidien dans le Rhin supérieur de titre

[PDF] S informer sur. Les documents d information des sociétés cotées en bourse

[PDF] Manuel de référence relatif à l hébergement

[PDF] RAID 1 LOGICIEL SOMMAIRE

[PDF] JOURNAL OFFICIEL. de la République Démocratique du Congo. Première partie 46 ème année n 23

[PDF] GRAINE Centre - Ecoparc - Domaine de Villemorant - 41210 Neung-sur-Beuvron Tel : 02 54 94 62 80 - Fax : 02 54 94 62 81

[PDF] LA RÉFORME SOLVABILITÉ II

[PDF] AIDE WINDOWS 8 8.1 10

[PDF] ATELIER DES ARTS 27 rue de Stalingrad 59150 WATTRELOS 06 61 83 73 98

[PDF] Politique WHOIS relative aux noms de domaine.eu