Sunday, March 25, 2018

Week 5

John George Bauer-Buis
2018-03-25
NET-140-001N

This first section is a synopsis of this chapter using the headings and subheadings from the textbook, with descriptions in my own words.

    •    Synopsis: Chapter 8 Deleting, Moving, and Renaming Files and Directories
    ⁃    The rm command removes files, and can remove directories as well when applied recursively with the -r option.  It can also be forced with the -f option.
    ⁃    Asterisks (*) can be used to match directories and files as a wildcard character when searching for or removing files.  Since hidden files and directories on *NIX systems begin with a period character (.), it is necessary to include that when searching for them.
    ⁃    The copy command, cp, creates duplicates, and works in a similar way to the move command, mv.  Both the move and copy commands can require a source and destination, like this:  cp existingFileLocation newFileLocation and mv originalFileLocation newFileLocation.  Likewise, both move and copy can be used interactively, which allows the user to avoid overwriting any existing data at the new location.  The copy command can also be used recursively, either copying it into the existing directory if that is the destination, or creating it if it does not exist.

    •    Synopsis: Chapter 9 Finding, Sorting, and Comparing Files and Directories
    ⁃    The find command can be used to search for items, especially grouping or showing only some of them by different criteria, such as then name (-name something, and case-insensatively with -iname something), by age (-mtime ageInDays), size (-size theActualSize), etc. 
    ⁃    The locate command is extremely similar to the find command, but it searches a database instead. Since the database is only updated daily, if it’s configured at all, it is not perfect, either.
    ⁃    Sorting inside files can be done with the sort command.
    ⁃    Comparing files can be done with the diff, sdiff, and vimdiff (which uses Vim) to compare files.  They are used the same way as the the copy and move commands, with the names of the two files after the command, although in this case the order does not necessarily make a difference.

I may add to this post at a later date if I discover more useful information that I think I should feature here.

Sunday, March 11, 2018

Week 4

John George Bauer-Buis
2018-03-11
NET-140-001N

Synopsis: Chapter 7  Viewing and Editing Files

  • Editing Files
    • Nano is a basic editor that can meet basic raw text editing needs.  It’s not so good for dealing with fonts and things of that nature, not being a word processor.  It has become my go-to editor for editing simple text files on *NIX systems from a CLI, in part due to its discoverability.
  • The Vim Editor
    • Vi and its successor, Vim, have three modes. On GNU systems, Vi is normally an alias of Vim, and redirects to it when it is run.
    • In Command Mode, Vim accepts commands from the user to do different things.  There are quite a few different commands that can be input, and distinctly, there are multiple modes for commands.
    • In Insert Mode, the user can enter or delete text from a file.  If the user is writing a document, they will spend a lot of time in this mode.
    • Line Mode is a more advanced command mode, (which it is sometimes called,) that offers additional features.  Typing a colon (:) in Command Mode enters it.
    • Commands can be Repeated by using a number as a prefix, such as 5i to insert 5 lines.
  • Emacs
    • Emacs is both a command-line and graphical editor, it can be used in either way.
  • Graphical Editors
    • Besides the graphical version of Emacs, there is also a graphical version of Vim, which is called gVim.  Additionally, there also exist gedit, geany, and the well known word-processor LibreOffice, to name a few other programs with graphical text-editing capabilities.  I have used geany on at least a few occasions, and have found it to not be resource-hungry, unlike some development tools and office suites.

Other Observations:
LibreOffice was developed from OpenOffice.

I may add to this post at a later date if I discover more useful information that I think I should feature here.