cs2042_Lecture2 - CS2042 - Unix Tools Lecture 2 Fall 2009...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS2042 - Unix Tools Lecture 2 Fall 2009 David Slater September 30, 2009 David Slater CS2042 - Unix Tools Last Time... Was everyone (who tried) able to log on to a UNIX system (csuglab or otherwise?) David Slater CS2042 - Unix Tools Review ls- l i s t directory contents cd- c hange d irectory pwd- p rint w orking d irectory rm- r e m ove file rmdir r e m ove dir ectory cp- c o p y file mv- m o v e file David Slater CS2042 - Unix Tools Path... Last Time I mentioned that the /bin , /usr/bin , and /usr/local/bin are where most programs are installed. These three directories are always included in the UNIX systems PATH. PATH When you type a command into the command prompt, the Shell looks in the systems PATH for an executable with that name For instance, when you type ls, the shell looks in /bin and finds the program ls and executes it To execute a program that is not in the PATH we must type the full path to the program, ex: /home/user/program1 If the program is in the current directory, we have to specify that: ./program1 See the fact that . refers to the current directory is useful! David Slater CS2042 - Unix Tools A Word about Flags/Options Most commands take flags (also called options). These usually come before any targets and begin with a- . One Option - ls -l Two Options - ls -l -Q Two Options - ls -lQ Applies options left to right rm -fi file prompts rm -if file does not prompt David Slater CS2042 - Unix Tools Your new best friend: How do I know how some fancy new command works? The man ual command man <command_name> Brings up the manual page (manpage) for the selected command Unlike google results, manpages are system-specific Gives a pretty comprehensive list of all possible options/parameters Use /<keyword> to perform a keyword search in a manpage The n-key jumps to successive search results David Slater CS2042 - Unix Tools Beware... There are subtle differences with options on different systems. For instance ls -B BSD/OSX - Force printing of non-printable characters in file names as \xxx , where xxx is the numeric value of the character in octal Ubuntu - do not list implied entries ending with This is why man is your best friend and google is your second best friend! David Slater CS2042 - Unix Tools Users, Groups, i.e. Lets All Play Nice Unix was designed to allow multiple people to use the same machine at once. This raises some security issues - How do we keep our coworkers from reading our email, browsing our documents and changing/deleting programs and files while Im using them? Access to files depends on the users account All acounts are presided over by the S uper u ser, or root account Each user has absolute control over any files he/she owns, which can only be superceded by root....
View Full Document

This note was uploaded on 03/15/2010 for the course CS 2024 taught by Professor Dinapoli during the Fall '07 term at Cornell University (Engineering School).

Page1 / 36

cs2042_Lecture2 - CS2042 - Unix Tools Lecture 2 Fall 2009...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online