
tracer tutorial: text reuse detection Introduction to the Command Line and Accessing Servers Remotely Marco B¨uchler, Emily Franzini and Greta Franzini table of contents 1. Connecting to the server 2. Command line introduction 2/100 connecting to the server connecting to the server 1. Mac + Linux: Open a terminal 2. Connect to server via ssh -l <login> 192.168.11.4 3. Enter password 4. Windows: Start Putty 4/100 command line introduction which folder am i in on the server? To identify your current directory location: • Command: pwd (parent working directory) • Usage: pwd <ENTER> • Example: pwd <ENTER> /Users/mbuechler 6/100 which files does my pwd contain? To list directory contents: • Command: ls (list) • Usage: • ls -l <FOLDER> <ENTER> // list all files and directories, one per line; • ls -la <FOLDER> <ENTER> // show also hidden files; • ls -lh <FOLDER> <ENTER> // show e.g. file sizes in a human-readable format. • Example: • ls -l <ENTER> • ls -lh /home/mbuechler <ENTER> 7/100 how to change to a different directory? To change to 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> 8/100 how to create a folder? 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” 9/100 how to copy a file? 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 10/100 how to remove a directory? To remove a directory: • Command: rm (removes a directory or a file) • Usage: rm -r <PATH TO FILE OR FOLDER> <ENTER> • Example: rm /storage/mbuechler/test <ENTER> 11/100 how to run a java programme? To run a Java programme: • Command: java (run a java programme) • Usage: java -Xmx1g -Dproperty=value -jar <programme> <ENTER> • Example: java -jar HelloWorld.jar 12/100 how to edit a file? To edit a file: • Command: vim (vi improved) • Usage: vim <file name> <ENTER> • Example: vim .bash profile (use cd first) 13/100 how to edit a file? vim commands: 1. Change to editor modus: type i (insert) 2. Leave editor modus: press ESC 3. Leave vim without writing changes to the disc: type :q! 4. Leave vim and write changes to the disc: type :wq 14/100 edit the bash profile vim commands: 1. Change to home folder: cd /home/mbuechler 2. Edit bash profile: vim .bash profile 3. Add two lines to select the correct Java version: 15/100 encoding guide 1. Most UTF-8 editors display the file encoding. 2. If you’re unsure about the encoding of your data or cannot display it correctly in a text editor, if the file is not too big try opening it in your standard text processing program (e.g. Microsoft Word or Open Office) to find information regarding the encoding. 3. Windows machines: install Cygwin from https://cygwin.com/install.html • COPY your .txt files to your Cygwin user directory and then: $ file *.txt • Depending on the output, list all possible encodings: $ iconv -l • And re-encode (e.g. Windows Hebrew to UTF-8): $ iconv -f CP1255 -t UTF-8 in.txt > out.txt 16/100 Finito! 17/100 contact Team Marco B¨uchler, Greta Franzini and Emily Franzini. Visit us http://www.etrap.eu [email protected] 18/100 licence The theme this presentation is based on is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Changes to the theme are the work of eTRAP. cba 19/100.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages19 Page
-
File Size-