1 / 10

CS320 Web and Internet Programming Linux Basics

CS320 Web and Internet Programming Linux Basics. Chengyu Sun California State University, Los Angeles. Directory Structure. root directory / current directory . Parent directory .. home directory ~. Moving Around. cd / absolute / path cd relative / path cd.

natania
Télécharger la présentation

CS320 Web and Internet Programming Linux Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS320 Web and Internet ProgrammingLinux Basics Chengyu Sun California State University, Los Angeles

  2. Directory Structure • root directory / • current directory . • Parent directory .. • home directory ~

  3. Moving Around • cd/absolute/path • cd relative/path • cd

  4. Directory and File Commands • Find current directory: pwd • List directory content: ls • list all files -a • list files in long format –l • Copy files • cp file1 file2 • cp file1 file2 dir • Move/rename file • mv file1 file2 • mv file1 file2 dir

  5. Some Useful Commands • Reference the manual pages • man <command> • Create command aliases • alias dir=“ls –lX” • Update the timestamp of a file • touch <filename> • “touch” web.xml will trigger Tomcat to reload your application

  6. Console vi, vim emacs pico With X Forwarding gvim xemacs gedit IDEs Netbeans Eclipse KDevelop Choices of Editors

  7. File Permissions • Three categories of users: • owner, group, other • Three privileges • read, write, execute

  8. File Permission Example -rw------- 1 cs320stu31 cs320stu31 116 Sep 24 14:53 .mysql_history drwx------ 2 cs320stu31 cs320stu31 4096 Sep 24 14:43 .ssh -rw------- 1 cs320stu31 cs320stu31 790 Sep 24 14:52 .viminfo -rw------- 1 cs320stu31 cs320stu31 63 Sep 28 10:09 .Xauthority drwxr-xr-x 2 cs320stu31 cs320stu31 4096 Sep 24 14:32 .xemacs

  9. Change File Permissions • chmod

  10. .bashrc • Executed every time you log into your account • A good place to put some commands that help you set up your environment

More Related