HOME     OBJECTIVE     UNINSTALL     INSTALL     INSTALL (CD)     SPEARFISH     BASH     READY?    
NOTES     QUESTIONS     LINKS     TO DO     FEEDBACK     PROBLEMS     SESSIONS: 01   02   03

Session 02: Unix/Linox commands

  1. All the "how-to-do-it" instructions on this webpage presuppose that you have done all the things described in Starting Point: Installed, and you are in compliance with the way things are supposed to look.

  2. We now have WinGRASS (with suitable sample data) all installed on our computers and we are now ready take it around the block. My startup screens look like this: :

    desktop
    CLICK TO ENLARGE

  3. Quote from GRASS 5 Tutorial"
    ...after the start-up of GRASS the GRASS commands (typically called GRASS modules) are at the same level as the other UNIX commands, meaning that all UNIX commands are also available in the terminal window where GRASS has been started. This concept allows the use of the entire might of UNIX and the programming of powerful procedures while working with GRASS.

  4. Moving around in subdirectories:
    1. All the commands we will be using in this session will executed in the Bash window at the command prompt.

    2. By clicking on the link for each command name, you will see other "switches" that can be used with the command for special purposes (some of which may be found not to work).
    3. First we need to establish which subdir we are in so we can get ourselves back here.
      pwd displays the name of the current working directory.

      By entering "pwd" and clicking Enter, my current directory is shown as
      /home/John
      and in your case it would say /home/[your user name]

      While my username subdirectory is shown capitalized, I have found by trial and error, that it is really un-capitalized (i.e., john).

    4. Next we will change directories using cd
      Entering "cd /" at the command prompt will take all the way back to the "root directory" (which we know is really c:/cygwin/).

    5. We are given a single slash mark
      /
      for a response, but we would like a little more confirmation so we enter the command
      ls which lists the contents of a directory. Our Bash window now looks like this:

      and we can see it contains the folders known to be in c:/cygwin.

    6. We will now use the cd command to put us back in the initial subdirectory (in my case, /home/john). We will enter
      cd /home/john [substitute your username for john]
      and we can confirm our location as before by using the command ls, and it shows that our current subdirectory contains
      database
      which we recognize as the directory we created in directory /home/john [your username], to which we extracted the Spearfish dataset.

    7. Other UNIX/Linox commands that I believed that I could try and found to work included:
      • mkdir to create a directory. Caution: after you have created the database directory to which you extracted the Spearfish dataset, GRASS is very intolerant of your creating any more directories since it does so automatically.
      • rmdir to remove a directory
      • mv to rename a directory
      • exit with which we are already familiar
      • alias which allows you assign short names to longer strings
      • ps which reports the process status
      • env Displays your UNIX environment variables. printenv does the same
      • date which displays the date and time in UNIX
      • whoami will display your username. Found here under "Environment Status"
      • finger outputs user information. Worked partially.
      • pwd displays the current directory name
      • history makes a numbered list of recent commands. !6 (no space) will re-execute that numbered 6. It has other tricks which I haven't tried.
      • wc displays a count of lines, words, and characters in a file.
      • cat. Allows you to look, modify or combine a file.

      • Undoubtedly, many others can be found at UNIX / Linux and variants which can be found to work but likely not with all options.

    8. UNIX commands which were found NOT to work included: vi, emacs, ed, quota and who, but there can certainly be others which will also not work.

    TOP

    References

    TOP

    Comments or suggestions?