Overview of course - PowerPoint PPT Presentation

1 / 43
About This Presentation
Title:

Overview of course

Description:

Prompts for the old password and then for a new one. ... http://orangutan.cv.nrao.edu/Talks/secure_risk/part_02.html. Directory Navigation ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 44
Provided by: ValuedGate772
Category:

less

Transcript and Presenter's Notes

Title: Overview of course


1
Introduction
  • Overview of course
  • Overview of site resources
  • Overview of terminology

2
Logging In
  • slogin -l ltusernamegt lthostnamegt
  • Typing slogin by itself will print out a list of
    all slogin options.
  • Options
  • -l ltusername connects to lthostnamegt using the
    username specified instead of the default.
  • Please dont use telnet or rlogin unless
    necessary since they are not as secure.

3
Changing Your Password
  • passwd
  • Changes a users password
  • Prompts for the old password and then for a new
    one. The old password must be typed correctly in
    order for the new password to be valid. The new
    password is typed twice to help prevent typing
    mistakes.
  • Choosing/Generating a password
  • http//orangutan.cv.nrao.edu/Talks/secure_risk/par
    t_02.html

4
Directory Navigation
  • ls -altr ltfilegt
  • Lists all the files in a current directory
  • Options
  • -a View hidden files
  • -l Long format listing which includes owner,
    permissions, time last modified, type of listing
    (file/link/directory)
  • -t lists files according to modification time
    (newest first)
  • -r lists files in reverse order (by name or by
    time)

5
Directory Navigation
  • cd ltpath to directorygt
  • Changes directory
  • Using . and ..
  • mkdir ltdirectory namegt
  • Creates a directory
  • rmdir ltdirectory namegt
  • Removes a directory if the directory is empty

6
Directory Navigation
  • grep -iv ltexpressiongt ltfilename(s)gt
  • Searches one or more files for the expression
  • Options
  • -i tells grep to ignore case
  • -v tells grep to print all lines that dont
    match ltexpressiongt

7
Directory Navigation
  • find ltpathname(s)gt ltcondition(s)gt
  • Descends the directory tree beginning at the
    pathname and locates the files that meet the
    condition(s)
  • Conditions
  • -name ltpatterngt searches for files with a
    specific name. Recommend enclose in quotation
    marks.
  • -print prints the matching files and
    directories with the entire pathname

8
Introduction to the BASH Shell
9
Permissions
  • In NFS, there are three types of permissions on
    files and directories read, write and execute.
    And there are three sets of users that you give
    these permissions to yourself, your group and
    everyone else.
  • You can see permissions when you do a long
    listing (ls -l)

10
Permissions
  • /home/ashelton/Reportsgt ls -l
  • total 50
  • drwxrwxr-x 2 ashelton monctrl 512
    Jan 19 1999 1998
  • -rw-r--r-- 1 ashelton monctrl 1948
    Jan 19 1999 99-01.txt
  • -rw-r--r-- 1 ashelton monctrl 3154
    Feb 19 1611 99-02.txt
  • -rw-r--r-- 1 ashelton monctrl 2752
    Mar 18 1607 99-03.txt
  • -rw-r--r-- 1 ashelton monctrl 3480
    Apr 19 1321 99-04.txt
  • -rw-r--r-- 1 ashelton monctrl 3083
    May 18 1613 99-05.txt
  • -rw-r--r-- 1 ashelton monctrl 2408
    Jun 24 0847 99-06.txt
  • -rw-r--r-- 1 ashelton monctrl 2711
    Jul 19 0938 99-07.txt
  • drwxr-xr-x 2 ashelton monctrl 512
    Sep 21 1998 LaTeX
  • -rw-rw-r-- 1 ashelton monctrl 0
    Aug 5 1528 temp.txt

11
Permissions
  • chmod -R ltmodegt ltfile(s)gt
  • Changes the access mode of specified files
  • Options
  • -R recursively descends the directory,
    including subdirectories and symbolic links

12
Permissions
  • Mode (letters)
  • Who u user, g group, o other, a all
  • Opcode add, - remove
  • Permission r read, w write, x execute
  • Example
  • To give yourself read/write permission, your
    group read permission and others no permissions
    to amy.txt chmod urw-x,gr-wx,o-rwx amy.txt

13
Permissions
  • Mode (octal)
  • User, group, other represented as a series of
    three binary numbers. Each of these three
    numbers represents read, write and execute
    permissions.
  • For example, to give read/write permissions to
    yourself, read permission to your group and
    nothing to everyone else, the binary number is
    formed by user group other r w x r w x
    r w x 1 1 0 1 0 0 0 0 0 640
    (octal)So the command is chmod 640 amy.txt

14
Permissions
  • groups ltusergt
  • Shows the groups to which the ltusergt belongs.
    The default is the current user.
  • umask ltvaluegt
  • Specifies which permissions are to be turned off.
    Usually found in .profile
  • ltvaluegt must be a three digit octal as explained
    in chmod

15
File Manipulation
  • cp -ir ltfile1gt ltfile2gtcp -ir ltfile(s)gt
    ltdirectorygt
  • Options
  • -i prompts the user for confirmation before
    overwriting an existing file. RECOMMENDED!
  • -r recursively copies a directory, its files
    and its subdirectories into the destination
    directory

16
File Manipulation
  • mv -i ltsource(s)gt ltdestinationgt
  • ltsource(s)gt can be either a directory or file(s)
  • ltdestinationgt can be an existing file, an
    existing directory or a new name (renaming)
  • Options
  • -i prompts the user for confirmation before
    overwriting an existing file. RECOMMENDED!

17
File Manipulation
  • rm -ir ltobject(s)gt
  • Deletes one or more files, links or directories.
  • Options
  • -i prompts the user for confirmation before
    deleting the specified file(s). RECOMMENDED!
  • -r must use if the object is a directory and is
    not empty. It removes the entire directory,
    including files and subdirectories.
    USE WITH CAUTION!

18
File Manipulation
  • Wildcards
  • Wildcards are used to search for patterns.
  • To look at all the files in a directory that
    begin with p, type ls p
  • To copy all the files that end in .txt in the
    current directory to a directory called
    Documents, type cp .txt Documents
  • USE WITH EXTREME CAUTION - ESPECIALLY WHEN
    REMOVING/MOVING THINGS!

19
File Manipulation
  • head -n ltfilegt
  • Used to print the first few lines in a file.
  • Options
  • -n changes the number of lines printed, where n
    is the number of lines. The default is 10 lines.
  • The ltfilegt expression is optional when using
    shell redirection
  • tail -n ltfilegt
  • Same as head, but prints the last few lines in a
    file.

20
File Manipulation
  • cat ltfile(s)gt
  • Used to read one or more files. If the file is
    long, use more instead.
  • zcat ltfile(s)gt
  • Used to view the contents of compressed files
    without changing them or uncompress them. In
    general, compressed files have a .gz or .Z
    extension.

21
File Manipulation
  • more ltfilegt
  • Prints the file one screenful at a time.
  • Press Enter to display the next line or the
    spacebar to display the next screenful.
  • Press q to quit and h for help with additional
    commands
  • Type /ltsearch_stringgt to look for a word/phrase
  • The ltfilegt expression is not used when using
    shell redirection - to be covered.

22
File Manipulation
  • compress -v ltfile(s)gt
  • Reduces the size of a file and renames it as
    ltfilegt.Z
  • Options
  • -v prints out the resulting of reduction
  • uncompress ltfile(s)gt.Z
  • Restores a file that has been compressed. The .Z
    extension is automatically removed.

23
File Manipulation
  • gzip -l9 ltfilegt
  • Compresses a file and renames it to ltfilegt.gz
  • Options
  • -l lists the compressed size, uncompress size,
    ratio and uncompressed name
  • -9 best compression - RECOMMENDED!
  • gunzip ltfilegt.gz
  • Uncompresses a .gz file and removes the .gz ending

24
File Manipulation
  • tar -x-c -v -f ltarchivegt ltfile(s)gt
  • Copies files to or restores files from an archive
  • Options
  • -x extracts files from an archive
  • -c creates a new archive
  • -v prints the names of the files in an archive
  • -f ltarchivegt specifies the archive from which
    to extract files or to save files. The default
    archive is /dev/mt0.

25
The BASH Shell (J. Ford)
26
Informational Commands
  • pwd
  • Prints the full pathname of the current directory
  • man -k ltkeywordgt ltcommandgt
  • Displays information from online reference
    manuals.
  • If ltcommandgt is specified, then information on
    that command is shown.
  • Options
  • -k returns manual pages containing ltkeywordgt

27
Informational Commands
  • env
  • Displays the current environment.
  • hostname
  • Prints the name of the computer (i.e. the
    computer you are logged into).

28
Informational Commands
  • w
  • Prints summaries of system usage, users who are
    currently logged in and what those users are
    doing.
  • finger ltusergt
  • Displays information about a specified ltusergt.
    ltusergt can take on the form _at_host or user_at_host
    for exploring other computers.

29
Miscellaneous Commands
  • clear
  • Clears the screen.
  • echo ltstringgt
  • Prints the specified ltstringgt to the screen.
  • which ltcommandgt
  • Lists files which would be executed if the named
    command had been run as a command
  • Can also use type

30
Miscellaneous Commands
  • talk ltusergt _at_lthostnamegt ltttygt
  • Allows two users to communicate. The screen is
    broken into two windows. The ltusergts typing
    appears on the bottom half of the screen.
  • Use _at_lthostnamegt if ltusergt is on a different
    machine.
  • Specify ltttygt if user is logged on multiple
    times.
  • To exit a talk session, press and hold the Ctrl
    key. Press the d key. Release the Ctrl key.

31
Process Management
  • ps -aef -ultusergt
  • Reports on active processes and shows their
    identification numbers
  • Options
  • -a lists all the processes associated with a
    terminal
  • -e lists all the processes
  • -f produces a full listing
  • -u ltusergt prints processes owned by the
    specified ltusergt

32
Process Management
  • kill -s KILL 9 ltidgt
  • Terminates the specified process
  • Options
  • The default signal sent to the process is TERM
    (15)
  • -s KILL kills a process absolutely. This
    should be used as a last resort since it does not
    clean up after the process!

33
Process Management
  • top
  • Shows listing of processes sorted by CPU usage
  • Press the h key to get a listing of options
    available within top
  • Press the q key to exit top

34
Editing Files
  • Command line pico
  • See handout
  • GUI dtpad
  • See handout

35
Transferring Files
  • ftp
  • See handout

36
NRAO Specific
  • x servers on a PC (not running Linux)
  • To get Tera Term Pro
  • http//www.zip.com.au/roca/ttssh.html
  • Start Tera Term Pro
  • Select TCP/IP, the host that you want to connect
    to and SSH for the service type
  • Note If SSH is not an option, make sure you are
    using the ttssh.exe file and not the ttermpro.exe
    file.
  • Click OK and enter your password at the prompt
  • You can use the Setup pull-down menu to
    personalize the SSH session

37
NRAO Specific
  • x servers on a PC (Exceed)
  • Starting the Virtual Desktop
  • Right click on Exceed on taskbar. Select Tools.
    Select Virtual Desktop.
  • Getting Help
  • Right click on Exceed on taskbar. Select Help.
    Select Contents.

38
CLEO (R. Maddalena)
39
Working With FITS Files
  • http//www2.gb.nrao.edu/doplot.html
  • Features
  • Easy to use
  • Runs on a PC
  • Drawbacks
  • Not well tested
  • Advanced users Use idl or idlde
  • For more information on FITS, see
    http//www.cv.nrao.edu/fits

40
NRAO Specific
  • sampler2log (J. Ford)
  • See handout
  • gbtlogview1 (R. Norrod)
  • See handout

41
NRAO Specific
  • reset box logins
  • What is a reset box?
  • There are two reset boxes gbtrbeq gbtrba
  • To connect to reset boxes use telnet
  • Usage
  • telnet ltreset_boxgt ltportgt
  • Example telnet gbtrbeq 15

42
YGOR
  • Message Windows
  • Usage messageWindow -h lthostgt
  • Options
  • -h lthostgt allows a user to connect to a message
    multiplexer (messageMux) on another machine
    specified by lthostgt
  • The host which is currently running the main
    Monitor and Control messageMux is vega

43
YGOR
  • Features of the Message Window
  • Press the h key to toggle the Help Screen.
  • a turns autoclear off, A turns autoclear on
  • C forces clearing of old messages
  • r refreshes the screen
  • exposes message levels, hides them
  • f moves forward a page, b moves backward
  • t sorts messages by time, l sorts by level
Write a Comment
User Comments (0)
About PowerShow.com