Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting Started with Unix Naomi Altman. Connecting to a PSU Linux Cluster click on SSH click on "quick connect" Host Name: lxcluster.tlt.psu.edu User.

Similar presentations


Presentation on theme: "Getting Started with Unix Naomi Altman. Connecting to a PSU Linux Cluster click on SSH click on "quick connect" Host Name: lxcluster.tlt.psu.edu User."— Presentation transcript:

1 Getting Started with Unix Naomi Altman

2 Connecting to a PSU Linux Cluster click on SSH click on "quick connect" Host Name: lxcluster.tlt.psu.edu User Name: access id (e.g. abc12) Connect

3 Some Important Concepts The "shell" The shell (command tool, tcsh) is where you run most programs, such as R, SAS, Netscape, etc. This allows you to write a "shell script" which is a set of Unix commands that you can run in sequence. You can run in interactive mode, or you can set up a script that allows you to run commands unattended.

4 The On-Line Help The help command is called man (for manual) Type: man for help with the man command and man cmd for help with the particular cmd you are interested. To scroll down, use "space bar". To quit, type "q"

5 Quit, Pause, Resume Just about any program can be exited by cntrl C. cntr Z can be used to temporarily pause a program. The program can be resumed in interactive mode by typing "fg" or in "background mode" by typing "bg". Programs running in the foreground (fg) always take priority in use of CPU over programs running in the background. This is handy if you want to do some other work while a CPU intensive program is running.

6 Some Important Concepts The "shell" Many shells can run at the same time, so you can have your simulation program running at the same time as other scripts. This allows Unix to allow multiprocessing. One important shell is the console, which is the main login shell (if you are the sole user) or the root user (for administrative machines such as servers).

7 Files Files are just text - they are not attached to programs like they are in Windows and MacIntosh. So, filename extensions are just for your own information. File names starting with "." are generally system files used by various programs (but you can tamper with them at your own risk). Files are stored on the central server and are accessible from any departmental computer.

8 File System Unix has a nested file system, similar to the folder system in Windows. Directory == folder

9 Command Format Unix commands usually have the format: cmd -options e.g. ls lists all the files in the current directory except hidden files (files whose names start with ".") ls -a lists all the files including hidden files. man ls

10 Some Useful Commands lslists the files and directories in the current directory moreprints the contents of a file mkdirmakes a new directory within the current one cdchanges directory pwdidentifies the name of the current directory rmremoves a file rmdirremoves a directory if it is empty killends a stopped process psgives information on all processes chmodpermits you to share files and directories with others tschcalls the shell

11 Redirecting Input and Output < allows you to send commands to a program from a file e.g. R < rcmds > allows the program to write to a file instead of to the screen. R R.output

12 Example of the Use of Redirection tcsh < shell.cmd tcsh shell.out more shell.out tcsh < shell.cmd | more "|" is a "pipe" sending the output of the left side to the program on the right side.


Download ppt "Getting Started with Unix Naomi Altman. Connecting to a PSU Linux Cluster click on SSH click on "quick connect" Host Name: lxcluster.tlt.psu.edu User."

Similar presentations


Ads by Google