{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs2042_Lecture2

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

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CS2042 - Unix Tools Lecture 2 Fall 2009 David Slater September 30, 2009 David Slater CS2042 - Unix Tools
Image of page 1

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

View Full Document Right Arrow Icon
Last Time... Was everyone (who tried) able to log on to a UNIX system (csuglab or otherwise?) David Slater CS2042 - Unix Tools
Image of page 2
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
Image of page 3

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

View Full Document Right Arrow Icon
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 system’s PATH. PATH When you type a command into the command prompt, the Shell looks in the system’s 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
Image of page 4
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
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 6
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
Image of page 7

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

View Full Document Right Arrow Icon
Users, Groups, i.e. Let’s 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 I’m 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. David Slater CS2042 - Unix Tools
Image of page 8
The Theory of Groups Files can also be assigned to groups of users, allowing reading, modifications and/or execution to be restricted to a subset of users Example: If each member of this class had an account on the same server, it would be wise to keep your assignments private (user based).
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern