1 / 12

Next Unix Topics

Next Unix Topics. Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14). s sh to account on faclinux.cse.ohio-state.edu stdlinux.cse.ohio-state.edu passwd Then follow prompts Questions or issues, call CSE Help Desk at 292-6542. How to print a file directory.

ronat
Download Presentation

Next Unix Topics

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. Next Unix Topics Tuesday, 2/11 & 18/2014

  2. Change Password (by 2/14/14) • ssh to account on • faclinux.cse.ohio-state.edu • stdlinux.cse.ohio-state.edu • passwd • Then follow prompts • Questions or issues, call CSE Help Desk at 292-6542

  3. How to print a file directory • Directories are not printable in Windows and MacOS X • do a directory in Unix • redirect output to file • print that file

  4. Print Directory • ls –la • To display directory • ls –la > temp • To redirect output to file • ls –la | temp • Won’t work because piping requires a program • To pipe to another program, so • ls –la | cat

  5. Start a Web Page • Working between your own machine and CSE machine mkdir, rmdir, rm, cat, chmod 644, some simple HTML • Basic Web page - HTML <html> <head> <title>4251 Sample</title> </head> <body>sample text<br/> more text </body> </html> • To copy a file (this one) from my Mac to faclinux to be on my web page: • Bobs-MacBook-Air:~ bobmathis$ scp -r ~/Desktop/CSE4251_Sp14.doc <same line> bmathis@faclinux.cse.ohio-state.edu:WWW/4251/CSE4251_Sp14.doc • Then update file permissions.

  6. Alias • Typing the command alone, shows what exists • dir alias ls –la

  7. Entering & Editing Text • emacs, vi, pico or nano • pico is the editor I use – because it is simplest • vi has two modes – entering text and editing it • emacs is most powerful • Choose what suits you andwhat your friends are using

  8. vi • vim – vi Improved • vi <file-name> • :x exit (save changes & quit) • :q! quit without saving • :w write file • :w <file> write <file>

  9. emacs • Ctrl-x Ctrl-w write file • Ctrl-x Ctrl-c save-buffers-kil-emacs

  10. Shell Variables

  11. Unix File System Tree

  12. Shell Scripts • Writing programs at operating system level • First trial script: #! /bin/bash # This is our first script. echo "Hello World!"

More Related