The Unix Shell

Total Page:16

File Type:pdf, Size:1020Kb

The Unix Shell The Unix Shell Files and Directories Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. Run Store Programs Data Communicate Interact with each other with us Files and Directories Introduction Run Store Programs shell Data Communicate Interact with each other with us Files and Directories Introduction Store shell Data Files and Directories Introduction Store shell Data file system Files and Directories Introduction Store shell Data file system files Files and Directories Introduction Store shell Data file system files directories Files and Directories Introduction Store shell Data Use the shell file system to view and change the file system files directories Files and Directories Introduction Store Use the shell shell Data to run commands file system to view what's in the file system files directories Files and Directories Introduction login: Files and Directories Introduction login: computer prompt in bold Files and Directories Introduction login: computer prompt in bold explanatory text in blue Files and Directories Introduction login: vlad user input in green Files and Directories Introduction login: vlad password: ******** password Files and Directories Introduction login: vlad password: ******** $$$ shell prompt Files and Directories Introduction login: vlad password: ******** $$$ shell prompt like Python's >>> and … Files and Directories Introduction login: vlad password: ******** $$$ whoami check user ID Files and Directories Introduction login: vlad password: ******** $$$ whoami check user ID shell finds the whoami program Files and Directories Introduction login: vlad password: ******** $$$ whoami check user ID shell finds the whoami program runs it Files and Directories Introduction login: vlad password: ******** $$$ whoami check user ID vlad shell finds the whoami program runs it prints its output Files and Directories Introduction login: vlad password: ******** $$$ whoami check user ID vlad shell finds the whoami program $$$ runs it prints its output displays a new prompt Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad $$$ pwd what is the working directory Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad $$$ pwd what is the working directory the directory used when no other directory is explicitly specified Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad $$$ pwd /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** $$$ whoami vlad $$$ pwd /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data users /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data users tmp /users/vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data users tmp /users /vlad $$$ Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data users tmp /users/vlad $$$ imhotep larry vlad Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data users tmp /users/vlad $$$ imhotep larry vlad Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data users tmp /users/ vlad $$$ imhotep larry vlad Files and Directories Introduction login: vlad root password: ******** / $$$ whoami vlad $$$ pwd bin data users tmp /users/vlad $$$ imhotep larry vlad Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad $$$ pwd /users/vlad $$$ ls stands for "listing" Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad $$$ pwd /users/vlad $$$ ls stands for "listing" sadly more memorable than most command names Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad $$$ pwd /users/vlad $$$ ls bin data mail music notes.txt papers pizza.cfg solar solar.pdf swc $$$ Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad an argument or flag modifying $$$ pwd the command's behavior /users/vlad $$$ ls -F bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ Files and Directories Introduction login: vlad password: ******** $$$ whoami vlad adds a trailing '/' to $$$ pwd directory names /users/vlad $$$ ls -F bin / data / mail / music / notes.txt papers / pizza.cfg solar / solar.pdf swc / $$$ Files and Directories Introduction $$$ ls -F bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ vlad bin data mail music notes.txt papers pizza.cfg solar solar.pdf swc Files and Directories Introduction $$$ ls -F bin/ data/ mail/ music/ notes .txt papers/ pizza .cfg solar/ solar .pdf swc/ By convention, use filename extension to indicate file type Files and Directories Introduction $$$ ls -F bin/ data/ mail/ music/ notes .txt papers/ pizza .cfg solar/ solar .pdf swc/ By convention, use filename extension to indicate file type .txt for text, .pdf for PDF, .cfg for configuration file, etc. Files and Directories Introduction $$$ ls -F bin/ data/ mail/ music/ notes .txt papers/ pizza .cfg solar/ solar .pdf swc/ By convention, use filename extension to indicate file type .txt for text, .pdf for PDF, .cfg for configuration file, etc. But this is only a convention, not a guarantee Files and Directories Introduction $$$ ls –F data Files and Directories Introduction $$$ ls –F data amino_acids.txt elements/ morse.txt pdb/ planets.txt sunspot.txt $$$ Files and Directories Introduction $$$ ls –F data amino_acids.txt elements/ morse.txt pdb/ planets.txt sunspot.txt $$$ a relative path vlad data Files and Directories Introduction $$$ ls –F data amino_acids.txt elements/ morse.txt pdb/ planets.txt sunspot.txt $$$ a relative path vlad relative to current working directory data Files and Directories Introduction $$$ ls –F /data access.log backup/ hardware.cfg network.cfg $$$ Files and Directories Introduction $$$ ls –F /data access.log backup/ hardware.cfg network.cfg $$$ an absolute path Files and Directories Introduction $$$ ls –F /data access.log backup/ hardware.cfg network.cfg $$$ an absolute path leading '/' means "from root" Files and Directories Introduction $$$ ls –F /data access.log backup/ hardware.cfg network.cfg $$$ / an absolute path leading '/' means "from root" so it always refers to this directory bin data users tmp imhotep larry vlad Files and Directories Introduction $$$ pwd /users/vlad $$$ Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ cd data Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ cd data change directory Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ cd data change directory actually doesn't change the directory Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ cd data change directory actually doesn't change the directory changes the shell's idea of which directory we are in Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ cd data $$$ pwd /users/vlad/data $$$ Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ cd data $$$ pwd /users/vlad/data $$$ ls amino_acids.txt elements/ morse.txt pdb/ planets.txt sunspot.txt $$$ Files and Directories Introduction $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ cd data because we're now "in" $$$ pwd this directory /users/vlad/data $$$ ls amino_acids.txt elements/ morse.txt pdb/ planets.txt sunspot.txt $$$ Files and Directories Introduction $$$ pwd /users/vlad/data $$$ Files and Directories Introduction $$$ pwd /users/vlad/data $$$ cd .. Files and Directories Introduction $$$ pwd /users/vlad/data $$$ cd .. the directory above the current one Files and Directories Introduction $$$ pwd /users/vlad/data $$$ cd .. the directory above the current one its parent directory Files and Directories Introduction $$$ pwd /users/vlad/data $$$ cd .. $$$ pwd /users/vlad $$$ Files and Directories Introduction $$$ pwd /users/vlad/data $$$ cd .. $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ Files and Directories Introduction $$$ pwd /users/vlad/data $$$ cd .. $$$ pwd /users/vlad $$$ ls bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ $$$ ls -F -a ./ ../ bin/
Recommended publications
  • Program #6: Word Count
    CSc 227 — Program Design and Development Spring 2014 (McCann) http://www.cs.arizona.edu/classes/cs227/spring14/ Program #6: Word Count Due Date: March 11 th, 2014, at 9:00 p.m. MST Overview: The UNIX operating system (and its variants, of which Linux is one) includes quite a few useful utility programs. One of those is wc, which is short for Word Count. The purpose of wc is to give users an easy way to determine the size of a text file in terms of the number of lines, words, and bytes it contains. (It can do a bit more, but that’s all of the functionality that we are concerned with for this assignment.) Counting lines is done by looking for “end of line” characters (\n (ASCII 10) for UNIX text files, or the pair \r\n (ASCII 13 and 10) for Windows/DOS text files). Counting words is also straight–forward: Any sequence of characters not interrupted by “whitespace” (spaces, tabs, end–of–line characters) is a word. Of course, whitespace characters are characters, and need to be counted as such. A problem with wc is that it generates a very minimal output format. Here’s an example of what wc produces on a Linux system when asked to count the content of a pair of files; we can do better! $ wc prog6a.dat prog6b.dat 2 6 38 prog6a.dat 32 321 1883 prog6b.dat 34 327 1921 total Assignment: Write a Java program (completely documented according to the class documentation guidelines, of course) that counts lines, words, and bytes (characters) of text files.
    [Show full text]
  • Cisco Telepresence Codec SX20 API Reference Guide
    Cisco TelePresence SX20 Codec API Reference Guide Software version TC6.1 April 2013 Application Programmer Interface (API) Reference Guide Cisco TelePresence SX20 Codec D14949.03 SX20 Codec API Reference Guide TC6.1, April 2013. 1 Copyright © 2013 Cisco Systems, Inc. All rights reserved. Cisco TelePresence SX20 Codec API Reference Guide What’s in this guide? Table of Contents Introduction Using HTTP ....................................................................... 20 Getting status and configurations ................................. 20 TA - ToC - Hidden About this guide .................................................................. 4 The top menu bar and the entries in the Table of Sending commands and configurations ........................ 20 text anchor User documentation ........................................................ 4 Contents are all hyperlinks, just click on them to Using HTTP POST ......................................................... 20 go to the topic. About the API Feedback from codec over HTTP ......................................21 Registering for feedback ................................................21 API fundamentals ................................................................ 9 Translating from terminal mode to XML ......................... 22 We recommend you visit our web site regularly for Connecting to the API ..................................................... 9 updated versions of the user documentation. Go to: Password ........................................................................
    [Show full text]
  • 1 A) Login to the System B) Use the Appropriate Command to Determine Your Login Shell C) Use the /Etc/Passwd File to Verify the Result of Step B
    CSE ([email protected] II-Sem) EXP-3 1 a) Login to the system b) Use the appropriate command to determine your login shell c) Use the /etc/passwd file to verify the result of step b. d) Use the ‘who’ command and redirect the result to a file called myfile1. Use the more command to see the contents of myfile1. e) Use the date and who commands in sequence (in one line) such that the output of date will display on the screen and the output of who will be redirected to a file called myfile2. Use the more command to check the contents of myfile2. 2 a) Write a “sed” command that deletes the first character in each line in a file. b) Write a “sed” command that deletes the character before the last character in each line in a file. c) Write a “sed” command that swaps the first and second words in each line in a file. a. Log into the system When we return on the system one screen will appear. In this we have to type 100.0.0.9 then we enter into editor. It asks our details such as Login : krishnasai password: Then we get log into the commands. bphanikrishna.wordpress.com FOSS-LAB Page 1 of 10 CSE ([email protected] II-Sem) EXP-3 b. use the appropriate command to determine your login shell Syntax: $ echo $SHELL Output: $ echo $SHELL /bin/bash Description:- What is "the shell"? Shell is a program that takes your commands from the keyboard and gives them to the operating system to perform.
    [Show full text]
  • DC Console Using DC Console Application Design Software
    DC Console Using DC Console Application Design Software DC Console is easy-to-use, application design software developed specifically to work in conjunction with AML’s DC Suite. Create. Distribute. Collect. Every LDX10 handheld computer comes with DC Suite, which includes seven (7) pre-developed applications for common data collection tasks. Now LDX10 users can use DC Console to modify these applications, or create their own from scratch. AML 800.648.4452 Made in USA www.amltd.com Introduction This document briefly covers how to use DC Console and the features and settings. Be sure to read this document in its entirety before attempting to use AML’s DC Console with a DC Suite compatible device. What is the difference between an “App” and a “Suite”? “Apps” are single applications running on the device used to collect and store data. In most cases, multiple apps would be utilized to handle various operations. For example, the ‘Item_Quantity’ app is one of the most widely used apps and the most direct means to take a basic inventory count, it produces a data file showing what items are in stock, the relative quantities, and requires minimal input from the mobile worker(s). Other operations will require additional input, for example, if you also need to know the specific location for each item in inventory, the ‘Item_Lot_Quantity’ app would be a better fit. Apps can be used in a variety of ways and provide the LDX10 the flexibility to handle virtually any data collection operation. “Suite” files are simply collections of individual apps. Suite files allow you to easily manage and edit multiple apps from within a single ‘store-house’ file and provide an effortless means for device deployment.
    [Show full text]
  • Understanding MPLS OAM Capabilities to Troubleshoot MPLS Networks
    Understanding MPLS OAM capabilities to troubleshoot MPLS Networks Mukhtiar A. Shaikh ([email protected]) Moiz Moizuddin ([email protected]) 1 Agenda • MPLS Overview • Existing Ping/Trace Capabilities • LSP Ping/Trace –Theory of Operation –MPLS Echo Packet –Configuration and Troubleshooting Using LSP Ping/Trace •LSP Ping •LSP Trace –AToM VCCV • Summary 222 MPLS OAM Overview • Converged network implies a wide range of applications and OAM needs • IP Based Tools A flexible set of tools LSP Ping / Traceroute End-End OAM Attachment VC OAM’s MPLS OAM Attachment VC OAM’s Ingress Egress LSP Created by LDP and/or RSVP-TE CE PE PE CE PWE3 or VPN Label 333 Agenda • MPLS Overview • Existing Ping/Trace Capabilities • LSP Ping/Trace –Theory of Operation –MPLS Echo Packet –Configuration and Troubleshooting Using LSP Ping/Trace •LSP Ping •LSP Trace –AToM VCCV • Summary 444 IP Ping • PING makes use of the Internet Control Message Protocol (ICMP) protocol • Ping message of 2 types type=8: ICMP echo request messages type=0: ICMP echo reply message • Optional data field is used to store the time at which the ICMP echo request message has been send • The Round Trip Time (RTT) 555 IP Traceroute • Traceroute makes use of the Internet Control Message Protocol (ICMP) protocol and TTL field on the IP header • Traceroute is sent in a UDP packet encapsulated on an IP packet • TTL-field of an IP datagram is processed by each hop in two possible ways If a hop holds IP-datagram for more than one second, it decrements the TTL-field of that IP datagram by the number
    [Show full text]
  • Introduction to Linux – Part 1
    Introduction to Linux – Part 1 Brett Milash and Wim Cardoen Center for High Performance Computing May 22, 2018 ssh Login or Interactive Node kingspeak.chpc.utah.edu Batch queue system … kp001 kp002 …. kpxxx FastX ● https://www.chpc.utah.edu/documentation/software/fastx2.php ● Remote graphical sessions in much more efficient and effective way than simple X forwarding ● Persistence - can be disconnected from without closing the session, allowing users to resume their sessions from other devices. ● Licensed by CHPC ● Desktop clients exist for windows, mac, and linux ● Web based client option ● Server installed on all CHPC interactive nodes and the frisco nodes. Windows – alternatives to FastX ● Need ssh client - PuTTY ● http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html - XShell ● http://www.netsarang.com/download/down_xsh.html ● For X applications also need X-forwarding tool - Xming (use Mesa version as needed for some apps) ● http://www.straightrunning.com/XmingNotes/ - Make sure X forwarding enabled in your ssh client Linux or Mac Desktop ● Just need to open up a terminal or console ● When running applications with graphical interfaces, use ssh –Y or ssh –X Getting Started - Login ● Download and install FastX if you like (required on windows unless you already have PuTTY or Xshell installed) ● If you have a CHPC account: - ssh [email protected] ● If not get a username and password: - ssh [email protected] Shell Basics q A Shell is a program that is the interface between you and the operating system
    [Show full text]
  • Windows Command Prompt Cheatsheet
    Windows Command Prompt Cheatsheet - Command line interface (as opposed to a GUI - graphical user interface) - Used to execute programs - Commands are small programs that do something useful - There are many commands already included with Windows, but we will use a few. - A filepath is where you are in the filesystem • C: is the C drive • C:\user\Documents is the Documents folder • C:\user\Documents\hello.c is a file in the Documents folder Command What it Does Usage dir Displays a list of a folder’s files dir (shows current folder) and subfolders dir myfolder cd Displays the name of the current cd filepath chdir directory or changes the current chdir filepath folder. cd .. (goes one directory up) md Creates a folder (directory) md folder-name mkdir mkdir folder-name rm Deletes a folder (directory) rm folder-name rmdir rmdir folder-name rm /s folder-name rmdir /s folder-name Note: if the folder isn’t empty, you must add the /s. copy Copies a file from one location to copy filepath-from filepath-to another move Moves file from one folder to move folder1\file.txt folder2\ another ren Changes the name of a file ren file1 file2 rename del Deletes one or more files del filename exit Exits batch script or current exit command control echo Used to display a message or to echo message turn off/on messages in batch scripts type Displays contents of a text file type myfile.txt fc Compares two files and displays fc file1 file2 the difference between them cls Clears the screen cls help Provides more details about help (lists all commands) DOS/Command Prompt help command commands Source: https://technet.microsoft.com/en-us/library/cc754340.aspx.
    [Show full text]
  • Don't Trust Traceroute (Completely)
    Don’t Trust Traceroute (Completely) Pietro Marchetta, Valerio Persico, Ethan Katz-Bassett Antonio Pescapé University of Southern California, CA, USA University of Napoli Federico II, Italy [email protected] {pietro.marchetta,valerio.persico,pescape}@unina.it ABSTRACT In this work, we propose a methodology based on the alias resolu- tion process to demonstrate that the IP level view of the route pro- vided by traceroute may be a poor representation of the real router- level route followed by the traffic. More precisely, we show how the traceroute output can lead one to (i) inaccurately reconstruct the route by overestimating the load balancers along the paths toward the destination and (ii) erroneously infer routing changes. Categories and Subject Descriptors C.2.1 [Computer-communication networks]: Network Architec- ture and Design—Network topology (a) Traceroute reports two addresses at the 8-th hop. The common interpretation is that the 7-th hop is splitting the traffic along two Keywords different forwarding paths (case 1); another explanation is that the 8- th hop is an RFC compliant router using multiple interfaces to reply Internet topology; Traceroute; IP alias resolution; IP to Router to the source (case 2). mapping 1 1. INTRODUCTION 0.8 Operators and researchers rely on traceroute to measure routes and they assume that, if traceroute returns different IPs at a given 0.6 hop, it indicates different paths. However, this is not always the case. Although state-of-the-art implementations of traceroute al- 0.4 low to trace all the paths
    [Show full text]
  • Dig, a DNS Query Tool for Windows and Replacement for Nslookup 2008-04-15 15:29
    dig, a DNS query tool for Windows and replacement for nslookup 2008-04-15 15:29 Disclaimer dig (dig for Windows ) (dig is a powerful tool to investigate [digging into] the DNS system) Source of the binary is from ftp.isc.org Manual Page of dig, in the cryptic Unix style, for reference only. (1) Download: Windows 2000 or Windows XP or Windows Vista ( dig version 9.3.2) Create a folder c:\dig Download this dig-files.zip and save it to c:\dig Use winzip or equivalent to extract the files in dig-files.zip to c:\dig Note: If msvcr70.dll already exists in %systemroot%\system32\ , then you can delete c:\dig\msvcr70.dll Note: Included in dig-files.zip is a command line whois, version 4.7.11: The canonical site of the whois source code is http://ftp.debian.org/debian/pool/main/w/whois/ The whois.exe file inside dig-files.zip is compiled using cygwin c++ compiler. (2) Do a file integrity check (why ? Because some virus checkers destroy dll files) Click Start.. Run ... type CMD (a black screen pops up) cd c:\dig sha1 * You should see some SHA1 hashes (in here, SHA1 hash is used as an integrity check, similar to checksums). Compare your hashes with the following table. SHA1 v1.0 [GPLed] by Stephan T. Lavavej, http://stl.caltech.edu 6CA70A2B 11026203 EABD7D65 4ADEFE3D 6C933EDA cygwin1.dll 57487BAE AA0EB284 8557B7CA 54ED9183 EAFC73FA dig.exe 97DBD755 D67A5829 C138A470 8BE7A4F2 6ED0894C host.exe D22E4B89 56E1831F F0F9D076 20EC19BF 171F0C29 libbind9.dll 81588F0B E7D3C6B3 20EDC314 532D9F2D 0A105594 libdns.dll E0BD7187 BBC01003 ABFE7472 E64B68CD 1BDB6BAB libeay32.dll F445362E 728A9027 96EC6871 A79C6307 054974E4 libisc.dll B3255C0E 4808A703 F95C217A 91FFCD69 40E680C9 libisccfg.dll DFBDE4F9 E25FD49A 0846E97F D813D687 6DC94067 liblwres.dll 61B8F573 DB448AE6 351AE347 5C2E7C48 2D81533C msvcr70.dll BDA14B28 7987E168 F359F0C9 DD96866D 04AB189B resolv.conf 1112343A 319C3EEE E44BF261 AE196C96 289C70E2 sha1.exe 21D20035 2A5B64E2 69FEA407 4D78053F 3C7A2738 whois.exe If your hashes are the same as the above table, then your files pass the integrity check.
    [Show full text]
  • Forest Quickstart Guide for Linguists
    Forest Quickstart Guide for Linguists Guido Vanden Wyngaerd [email protected] June 28, 2020 Contents 1 Introduction 1 2 Loading Forest 2 3 Basic Usage 2 4 Adjusting node spacing 4 5 Triangles 7 6 Unlabelled nodes 9 7 Horizontal alignment of terminals 10 8 Arrows 11 9 Highlighting 14 1 Introduction Forest is a package for drawing linguistic (and other) tree diagrams de- veloped by Sašo Živanović. This manual provides a quickstart guide for linguists with just the essential things that you need to get started. More 1 extensive documentation is available from the CTAN-archive. Forest is based on the TikZ package; more information about its commands, in par- ticular those controlling the appearance of the nodes, the arrows, and the highlighting can be found in the TikZ documentation. 2 Loading Forest In your preamble, put \usepackage[linguistics]{forest} The linguistics option makes for nice trees, in which the branches meet above the two nodes that they join; it will also align the example number (provided by linguex) with the top of the tree: (1) CP C IP I VP V NP 3 Basic Usage Forest uses a familiar labelled brackets syntax. The code below will out- put the tree in (1) above (\ex. requires the linguex package and provides the example number): \ex. \begin{forest} [CP[C][IP[I][VP[V][NP]]]] \end{forest} Forest will parse the above code without problem, but you are likely to soon get lost in your labelled brackets with more complicated trees if you write the code this way. The better alternative is to arrange the nodes over multiple lines: 2 \ex.
    [Show full text]
  • Shell Variables
    Shell Using the command line Orna Agmon ladypine at vipe.technion.ac.il Haifux Shell – p. 1/55 TOC Various shells Customizing the shell getting help and information Combining simple and useful commands output redirection lists of commands job control environment variables Remote shell textual editors textual clients references Shell – p. 2/55 What is the shell? The shell is the wrapper around the system: a communication means between the user and the system The shell is the manner in which the user can interact with the system through the terminal. The shell is also a script interpreter. The simplest script is a bunch of shell commands. Shell scripts are used in order to boot the system. The user can also write and execute shell scripts. Shell – p. 3/55 Shell - which shell? There are several kinds of shells. For example, bash (Bourne Again Shell), csh, tcsh, zsh, ksh (Korn Shell). The most important shell is bash, since it is available on almost every free Unix system. The Linux system scripts use bash. The default shell for the user is set in the /etc/passwd file. Here is a line out of this file for example: dana:x:500:500:Dana,,,:/home/dana:/bin/bash This line means that user dana uses bash (located on the system at /bin/bash) as her default shell. Shell – p. 4/55 Starting to work in another shell If Dana wishes to temporarily use another shell, she can simply call this shell from the command line: [dana@granada ˜]$ bash dana@granada:˜$ #In bash now dana@granada:˜$ exit [dana@granada ˜]$ bash dana@granada:˜$ #In bash now, going to hit ctrl D dana@granada:˜$ exit [dana@granada ˜]$ #In original shell now Shell – p.
    [Show full text]
  • NETSTAT Command
    NETSTAT Command | NETSTAT Command | Use the NETSTAT command to display network status of the local host. | | ┌┐────────────── | 55──NETSTAT─────6─┤ Option ├─┴──┬────────────────────────────────── ┬ ─ ─ ─ ────────────────────────────────────────5% | │┌┐───────────────────── │ | └─(──SELect───6─┤ Select_String ├─┴ ─ ┘ | Option: | ┌┐─COnn────── (1, 2) ──────────────── | ├──┼─────────────────────────── ┼ ─ ──────────────────────────────────────────────────────────────────────────────┤ | ├─ALL───(2)──────────────────── ┤ | ├─ALLConn─────(1, 2) ────────────── ┤ | ├─ARp ipaddress───────────── ┤ | ├─CLients─────────────────── ┤ | ├─DEvlinks────────────────── ┤ | ├─Gate───(3)─────────────────── ┤ | ├─┬─Help─ ┬─ ───────────────── ┤ | │└┘─?──── │ | ├─HOme────────────────────── ┤ | │┌┐─2ð────── │ | ├─Interval─────(1, 2) ─┼───────── ┼─ ┤ | │└┘─seconds─ │ | ├─LEVel───────────────────── ┤ | ├─POOLsize────────────────── ┤ | ├─SOCKets─────────────────── ┤ | ├─TCp serverid───(1) ─────────── ┤ | ├─TELnet───(4)───────────────── ┤ | ├─Up──────────────────────── ┤ | └┘─┤ Command ├───(5)──────────── | Command: | ├──┬─CP cp_command───(6) ─ ┬ ────────────────────────────────────────────────────────────────────────────────────────┤ | ├─DELarp ipaddress─ ┤ | ├─DRop conn_num──── ┤ | └─RESETPool──────── ┘ | Select_String: | ├─ ─┬─ipaddress────(3) ┬ ─ ───────────────────────────────────────────────────────────────────────────────────────────┤ | ├─ldev_num─────(4) ┤ | └─userid────(2) ─── ┘ | Notes: | 1 Only ALLCON, CONN and TCP are valid with INTERVAL. | 2 The userid
    [Show full text]