1 / 11

CS320 Web and Internet Programming Development on a Linux Server

This tutorial covers the directory structure, file commands, environment variables, and file permissions in Linux server programming and development. Learn how to navigate directories, copy and move files, set and show environment variables, and change file permissions.

jeremyr
Télécharger la présentation

CS320 Web and Internet Programming Development on a Linux Server

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 ProgrammingDevelopment on a Linux Server 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”

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

  7. Environment Variables • Set an environment variable X • export X=“something” • Show an environment variable X • echo$X • Common environment variables • $HOME, $PATH • $JAVA_HOME

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

  9. 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

  10. Change File Permissions • chmod

  11. .bashrc • Executed every time you log into your account • A good place to put some commands that help you set up your environment • wget http://www.calstatela.edu/faculty/csun/teaching/cs320/extras/.bashrc

More Related