introduction to command line and accessing servers
play

Introduction to command line and accessing servers remotely Marco - PowerPoint PPT Presentation

Introduction to command line and accessing servers remotely Marco Bchler, Emily Franzini, Greta Franzini, Maria Moritz eTRAP Research Group Gttingen Centre for Digital Humanities Institute of Computer Science Georg August University


  1. Introduction to command line and accessing servers remotely Marco Büchler, Emily Franzini, Greta Franzini, Maria Moritz eTRAP Research Group Göttingen Centre for Digital Humanities Institute of Computer Science Georg August University Göttingen, Germany DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  2. Who am I? • 2001/2 Head of Quality Assurance department in a software company • 2006 Diploma in Computer Science on big • scale co-occurrence analysis • 2007- Consultant for several SMEs in IT sector • 2008 Technical project management of eAQUA project • 2011 PI and project manager of eTRACES project • 2013 PhD in „Digital Humanities“ on Text Reuse • 2014- Head of Early Career Research Group eTRAP at Göttingen Centre for Digital Humanities DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  3. Agenda 1) Connecting to the server 2) Some command line introduction DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  4. Connecting to the server 1) Windows: Start Putty 2) Mac + Linux: Open a terminal 3) Connecting to server via ssh -l <login> 192.168.11.4 4) Enter password DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  5. Which folder am I on the server? Command : pwd (parent working directory) Usage : pwd <ENTER> Example : pwd <ENTER> DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  6. Which files and directories are contained in my pwd? Command : ls (list) Usage : ls -l <FOLDER> <ENTER> // list all files and directory one on each line ls -la <FOLDER> <ENTER> // show also hidden files ls -lh <FOLDER> <ENTER> // show e.g. files sizes in human- friendly version Example : ls -l <ENTER> ls -lh /home/mbuechler <ENTER> DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  7. How to change a different directory? Command : cd (change directory) Usage : cd <FOLDER> <ENTER> // change to <folder> Example : cd ~ <ENTER> // change to „home folder“ cd /storage <ENTER> cd .. <ENTER> DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  8. How to create a folder? Command : mkdir (make directory) Usage : mkdir <FOLDER> <ENTER> // change to folder Example : mkdir /storage/mbuechler <ENTER> // creates a directory in /storage called mbuechler mkdir /storage/mbuechler/test <ENTER> // creates a directory in /storage/mbuechler called test DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  9. How to copy a file? Command : cp (copy file) Usage : cp <PATH_TO_FILE> <TARGET_FOLDER> <ENTER> Example : cp /storage/HelloWorld.jar /storage/mbuechler <ENTER> // copies HelloWorld.jar to /storage/mbuechler DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  10. How to remove a directory? Command : rm (removes directory or file) Usage : rm -r <PATH_TO_FILE_OR_FOLDER> <ENTER> Example : rm /storage/mbuechler/test <ENTER> DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  11. How to run a java programme? Command : java (run a java programme) Usage : java -Xmx1g -Dproperty=value -jar <programme> <ENTER> Example : java -jar HelloWorld.jar DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  12. How to edit a file? Command : vim (vi improved) Usage : vim <file_name> <ENTER> Example : vim .bash_profile (use cd ~ first) DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  13. How to edit a file? vim command : 1) Change to editor modus: type „i“ (insert) 2) Leave editor modus: press ESC-button 3) Leave vim without writing changes to disc: type „ :q! “ 4) Leave vim with writing changes to disc: type „ :wq “ DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  14. Edit the bash_profile vim command : 1) Change to home folder: cd /home/mbuechler 2) Edit bash_profile: vim .bash_profile 3) Add two lines for adding the correct java version: DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

  15. Encoding guide 1) Most UTF-8 editors are able to display the encoding (e.g. on the bottom) 2) If you are not sure, which encoding your data is in or have troubles to display them properly in an editor AND the file is not too big, you can try to open it in your standard text processing program (e.g.Word) to find information on the encoding. 3) Windows: install Cygwin (https://cygwin.com/install.html) 4) After you made sure your .txt files are COPIED to your (cygwin) user directory: $ file *.txt 5) Depending on the output, list all possible encodings: $ iconv -l 6) And re-encode (e.g. Windows Hebrew to UTF-8): $ iconv -f CP1255 -t UTF-8 in.txt > out.txt DH Estonia 2015 - Text Reuse Hackathon 20. Oktober 2015

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend