Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt

上传人:仙人指路1688 文档编号:2965849 上传时间:2023-03-05 格式:PPT 页数:47 大小:459.50KB
返回 下载 相关 举报
Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt_第1页
第1页 / 共47页
Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt_第2页
第2页 / 共47页
Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt_第3页
第3页 / 共47页
Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt_第4页
第4页 / 共47页
Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt_第5页
第5页 / 共47页
点击查看更多>>
资源描述

《Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt》由会员分享,可在线阅读,更多相关《Unix Tutorial for FreeSurfer Users:UNIX教程Freesurfer用户.ppt(47页珍藏版)》请在三一办公上搜索。

1、Unix Tutorial for FreeSurfer Users,Ender Konukoglu,What is Unix/Linux?,An operating system(like Windows and OS X)Linux is the free,modifiable,and redistributable version of Unix Why use it?,What is Unix/Linux?,An operating system(like Windows and OS X)Linux is the free,modifiable,and redistributable

2、 version of Unix Why use it?power to write many scripts with many commands to work with lots of datato use computer resources on the network efficiently,such as clusters,Getting Started,Communicate with operating system through a“shell”or terminal window.For Linux:Double click Terminal icon on Deskt

3、op For Macs:Double click on hard driveApplications Utilities X11(double click)Applications Utilities Terminal,Warm Up,Type:and hit enter.,date,Warm Up,Type:and hit enter.Should see,date,Mon Apr 6 8:05:24 EDT 2009,Warm Up,Type:and hit enter.Should seeType:and hit enter.,date,Mon Apr 6 8:05:24 EDT 200

4、9,cal,Warm Up,Type:and hit enter.Should seeType:and hit enter.Should see,date,Mon Apr 6 8:05:24 EDT 2009,cal,April 2009Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 17 1819 20 21 22 23 24 2526 27 28 29 30,Directories,Unix uses a hierarchical file system(think folders in Windows),Directo

5、ries,Unix uses a hierarchical file system(think folders in Windows),Home is like“My Computer”,Directories,Unix uses a hierarchical file system(think folders in Windows),Home is like“My Computer”,Like“My Documents”,Directories,Unix uses a hierarchical file system(think folders in Windows),Home is lik

6、e“My Computer”,Like“My Documents”,Like“My Photos”,Directories,Unix uses a hierarchical file system(think folders in Windows),Home is like“My Computer”,Like“My Documents”,Like“My Photos”,picture.jpg,Location,Type:and hit enter.Should seeshows“present working directory”or current location as a pathsim

7、ilar to:/MyComputer/MyDocuments/MyPhotos,pwd,/home/nmrclass,/Users/YourName,OR,Opening a Directory,Not double clicking Type command to“open”,Commands to open files will differ,Navigating Directories,“change directory”:move into a folder“list”:see contents of directory,ls,cd _,ls _,Navigating Directo

8、ries,“change directory”:move into a folder“list”:see contents of directory,ls,cd _,ls _,Desktop matlab tmp TUTORIAL_DATA,Anatomy of a Command,command-option1 option2 file,command-help,Anatomy of a Command,command-option1 option2 file,command-help,ls-help,Try:,Directory Contents,List contents of dire

9、ctory you are in lists names of directories/files,ls,ls-lrt,ls-l,ls-a,Directory Contents,List contents of directory you are in lists names of directories/files lists hidden files too,.xdebug_tkmedit.cshrc.alias,ls,ls-lrt,ls-l,ls-a,Directory Contents,List contents of directory you are in lists names

10、of directories/files lists hidden files too lists file detailsdrwxrwx-,user,group,others,ls,ls-lrt,ls-l,ls-a,Directory Contents,List contents of directory you are in lists names of directories/files lists hidden files too lists file details lists recent files last,ls,ls-lrt,ls-l,ls-a,Save Some Time,

11、Filename Completion hit Tab key should see hit enterHistoryhit keyshould seeshould see the recent commands,ls Des,ls Desktop,ls Desktop,history,Changing Directories,makes a new directory“practice”changes to directory“practice”,mkdir practice,cd practice,ls-lrt,pwd,ls,pwd,/home/nmrclass,/home/nmrclas

12、s/practice,should see,should see,should see,Nothing!,Changing Directories,Changing Directories,mkdir stuff,ls,makes folder“stuff”inside practice,should see“stuff”,Using an Editor,If using a Mac:Type:I could write a script in here.File Save(Buffer)File Exit emacsshould see“mynotes.txt”,emacs mynotes.

13、txt,pico mynotes.txt,ls,Ctrl-x if using pico and then Y and enter,Using an Editor,If using a Mac:Type:I could write a script in here.File Save(Buffer)File Exit emacsshould see“mynotes.txt”,gedit mynotes.txt,pico mynotes.txt,ls,Ctrl-x if using pico and then Y and enter,Using an Editor,Copying files,l

14、s,cp-help,cp mynotes.txt stuff,cd stuff,more mynotes.txt,learn all the options or“arguments”,is the copy command,cp,Copying files,ls,cp-help,cp mynotes.txt stuff,cd stuff,less mynotes.txt,learn all the options or“arguments”,is the copy command,cp,Changing Directories,shows one directory up,ls.,pwd,/

15、home/nmrclass/practice/stuff,ls./.,goes up two!,cd.,should see,cd./.,can also do(but dont):,Copying/Moving files,cp mynotes.txt myothernotes.txt,Could also use do:,mv myothernotes.txt hernotes.txt,mv hernotes.txt.,Removing Files,rm mynotes.txt,ls,pwd,should be in“stuff”,ls,Review,no double clickingm

16、kdirlscdpwdemacs,gedit,vi,picocprm,Using FreeSurfer,With FreeSurfer,certain variables must be set in order to use it correctly:FREESURFER_HOMESUBJECTS_DIR,tell Operating System where FreeSurfer is,tell FreeSurfer where data is,Required Variables,To go to location of your data:$means take the value o

17、f the variable,cd$SUBJECTS_DIR,setenv SUBJECTS_DIR/path/to/data,Required Variables,To go to location of your data:$means take the value of the variable,cd$SUBJECTS_DIRakacd/path/to/data,setenv SUBJECTS_DIR/path/to/data,$,How echo works:To set a variable:To check what a variable is set to:,echo$TEST_

18、VARIABLE,setenv TEST_VARIABLE yourfirstname,echo It is called football not soccer.,Required Variables,With FreeSurfer,certain variables must be set in order to use it correctly:FREESURFER_HOMESUBJECTS_DIR,tell Operating System where FreeSurfer is,tell FreeSurfer where data is,echo$FREESURFER_HOME,ec

19、ho$SUBJECTS_DIR,To check variables,Visualization Tools,For FreeSurfer visualization tools:,tkmedit subj001 T1.mgz-aux wm.mgz,tksurfer subj001 lh inflated,VisualizationTool subject data_file-aux other_data_file,VisualizationTool subject hemisphere data_file,freeview volume1 volume2-f surface1 surface

20、2,More Help,http:/surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/CommandLineNavigationLinks on Wiki under“Unix Tutorial”Glossary of Unix commands,The End,Good Luck!,Writing Scripts,Putting multiple commands together.Automatically running a sequence of commandsExample:create a file named my_first_scrip

21、t.csh with the contents:,#!/bin/cshsetenv name FreeSurferecho I love$name!,%chmod u+x my_first_script.csh%./my_first_script.csh,Loops in Scripts,You can create loops,if statements,Example:create a file named my_first_loop.csh with the contents:,#!/bin/cshforeach name(Bill Murray Wes Anderson)echo I love$name!end,Inputs to Scripts,You can create take inputs from the command lineExample:create a file named my_first_IO.csh with the contents:,#!/bin/cshecho The$0 command is called with$#argv parametersecho parameter 1 is$1echo parameter 2 is$2,

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 建筑/施工/环境 > 项目建议


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号