16.05.2015 Views

Working with the Unix OS

Working with the Unix OS

Working with the Unix OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction to <strong>Unix</strong><br />

Multiple commands can be entered on a single line, provided <strong>the</strong>y are separated by a ";". To terminate a<br />

command you can type ^c (interrupt).<br />

! Input and Output<br />

The default input comes from <strong>the</strong> terminal keyboard and output goes to <strong>the</strong> terminal screen.<br />

! Redirection & Pipes<br />

> output redirection, e.g. ls > filelist<br />

" append output, e.g. cat filename " files<br />

< input redirection, e.g. mail joe mary < letter<br />

| pass output from one command to ano<strong>the</strong>r,<br />

e.g. sort filename | uniq | more who | wc-1<br />

2> write standard errors to file, e.g. command> outfile 2> errorfile<br />

& allows commands to be submitted for background processing by appending "&" to<br />

<strong>the</strong> command line, e.g. spssx outfile 2> errorfile &<br />

Note: C shell syntax is: (spssx < cmdfile > outfile) >& errorfile &<br />

Logging In<br />

! Logging In<br />

login: enter your user name.<br />

password: enter your password.<br />

message of today<br />

(hp) enter your terminal name<br />

$ system prompt (Bourne, Korn)<br />

! Logging Out<br />

% logout from C-shell<br />

$ exit from Korn shell<br />

$ ^d short logout if allowed<br />

Remember to logout!!!<br />

! Changing Password<br />

$ passwd<br />

Changing password for user_name<br />

Old password:<br />

New password: e.g.: no01WAY.<br />

Re-enter new password:<br />

! Terminal Type<br />

$ TERM=vtlOO<br />

$ export TERM<br />

! Halt screen output<br />

^s stop scrolling<br />

^q start scrolling<br />

13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!