CISS 125 Midterm

Command Line Basics

  • cd - Change directory to navigate between folders in the command line interface.

  • md (mkdir) - Create a new directory (folder) within the current working directory. Use this command followed by the desired folder name, e.g., md NameOfFolder.

  • /? - Displays help information about commands, useful for troubleshooting or learning commands.

  • . - Represents the current directory you're in, assisting in relative file navigation.

  • .. - Denotes the parent directory, allowing you to move up one level of the directory structure.

File Pathways

  • Absolute Path - This is the full, exact location of a file or directory starting from the system root. It provides the complete route to access the specific file or folder regardless of your current working directory.

  • Relative Pathway - Refers to the location of a file or directory in relation to the current working directory. This is useful for simplifying navigation commands without needing the full path.

File Management Commands

  • rd - Removes a directory. This command only works if the directory is empty.

    • /s - Used with the rd command to remove a directory and all its contents, including subdirectories.

    • /q - Quiet mode; it does not prompt for confirmation when deleting a directory.

  • COPY - Command to copy files from one location to another. This requires specifying both the source and destination, e.g., copy documents/dir.txt desktop.

  • move - Similar to the COPY command but moves the file instead of creating a duplicate.

  • del - Deletes one or more specified files. Use this with caution, as deleted files cannot be easily recovered.

Viewing and Navigating Directories

  • tree - Creates a visual representation of the directory structure, showing all the directories and files in a tree format.

  • redirect - Directs the output of a command to a specified location. Example: dir > location makes a new file containing the command output.

  • dir >> - Appends the output of the command to an existing file rather than overwriting it.

Keyboard Shortcuts

  • Use the up and down arrow keys to scroll through previously entered commands to quickly rerun them.

  • The left and right arrow keys allow movement through individual characters of the command line text for editing purposes.

Managing the System

  • Changing Drives - To navigate to a different drive, type the drive letter followed by a colon (e.g., D:).

  • Group Edit - To access group policies, type 'group' in the search bar.

  • Microsoft Management Console (MMC) - This tool allows users to create a customized interface for managing system components, known as snap-ins. Adding or removing snap-ins is possible to tailor the console to specific needs.

Windows 10 Features

  • New Notifications Center - Central hub for security alerts and maintenance notifications, keeping the user informed about system health and updates.

  • Snapping - A feature that allows users to arrange open applications on the screen edges or in different areas, enhancing multitasking efficiency.

  • Notepad - A basic text editor, ideal for simple text editing without formatting options.

Windows 10 Editions

  • Varieties include Enterprise, Education, Home, and Pro, each offering different features and functionalities tailored to various user needs.

Troubleshooting Principles

  • Regular troubleshooting is vital for identifying and fixing issues. Key questions to ask include:

    • Is there an error message present on-screen or in logs (Event Viewer/System Information)?

    • Has the OS restarted unexpectedly?

    • Have there been any recent changes in settings or applications?

Initial Troubleshooting Steps

  • The first step in diagnosing issues typically involves:

    • Shutting down and rebooting the system to clear temporary faults.

    • Checking the BIOS to ensure system configurations are correct.

    • Disconnecting external devices and reconnecting them one by one to identify hardware-related issues.

Troubleshooting Tools in Windows 10

  • Utilize built-in tools like Windows Memory Diagnostic, Reliability Monitor, and the Troubleshooting section found in the settings to help resolve issues.

Advanced Troubleshooting Techniques

  • When dealing with startup issues, you may need to disable certain startup programs or services to identify what is causing the problem.

  • Familiarize yourself with the Device Manager for managing devices and updating or reinstalling drivers.

Recovery Options

  • If problems persist, access the Recovery Environment through settings to use tools like System Repair Disc, Windows 10 Install Media, or the Recovery Drive for advanced recovery options.

Safe Mode

  • Seeing the system in Safe Mode allows for troubleshooting by loading only essential files and drivers, useful for diagnosing issues like connection errors, drivers malfunction, or OS stability problems.

Repairing Your PC

  • Consider using built-in features like Automatically Repair, System Restore, and PC Reset, where you can choose to keep or wipe data while reinstalling Windows.

Network Troubleshooting Commands

  • ipconfig - Displays current IP configurations, essential for networking issues.

  • ping - Sends packets to a specified address to check connectivity and response times.

  • netstat - Provides additional networking information, helping diagnose connection issues.

Windows Updates Management

  • Understanding how to manage Windows updates, including setting up automatic updates, checking for and installing updates manually, and scheduling maintenance can enhance system performance and security.

Managing Applications

  • Use the Apps and Features or Programs and Features menu to manage installed applications. Users can modify installations, repair applications, or uninstall software as needed.

Compatibility Mode

  • This feature aids in running older software not designed for Windows 10 by emulating an earlier Windows environment and adjusting settings like display and permissions accordingly.

File Systems

  • NTFS (New Technology File System) - A modern file system that supports larger file sizes and is optimized for use with SSDs (Solid State Drives).

  • Platter, Track, and Cylinder - Key components of how data is organized physically on traditional hard drives, affecting data access and storage efficiency.

  • Seek Time - The duration required for a hard drive's read/write head to locate the correct track for reading or writing data, pivotal for performance measurements.

What is a Batch File?

A batch file is a text file format used specifically in Windows operating systems to execute a sequence of commands in the Command Prompt (CMD).Batch files are named so because they execute 'batches' of commands simultaneously, which significantly simplifies the process of automating repetitive tasks.These files are saved as plain text and must have a .bat extension to be recognized as executable scripts. To run a batch file, users can eithertype the name of the file in the command prompt or double-click the .bat file in the graphical user interface (GUI).For more detailed information, you can refer to page 683 in the Windows 10 textbook.

Common Batch File Commands

  • ECHO - Displays text on the screen, useful for feedback during execution.

  • ECHO OFF - Hides the command display in the command prompt, making outputs cleaner.

  • REM - Inserts remarks or comments within your batch file, which are ignored during execution; helpful for future reference or explanations.

  • PAUSE - Keeps the command prompt or script open until the user presses a key, allowing them to review outputs before closing.

  • DIR - Lists all files and subdirectories within the current directory, aiding in navigation and organization.

  • MKDIR / RMDIR - Commands to create or delete directories, facilitating file organization.

  • DEL - Deletes specified files from the directory permanently, warranting caution due to irretrievable data loss.

  • COPY - Copies files from one location to another, requiring specification of both the source and destination.

  • IF - A conditional statement used to check if certain conditions are met, allowing for decision-making processes within the script.

TIP: Almost every command learned in CMD can be utilized in batch files. For any command you're unfamiliar with, use the /? help switch to get detailed information about it, for example, dir /?.

How to Create a Batch File

Batch files can be created using various text editors such as Notepad, Notepad++, Visual Studio Code, or any similar tools.The subsequent steps will illustrate how to create your first batch file using the Command Prompt along with Notepad, followed by demonstrations using Notepad++ and Visual Studio Code for more advanced editing features.

Batch File Variables

Batch files allow for the use of variables to store values and execute tasks more efficiently, like copying or renaming files.Variables can be created by using % parameters of the set command or by passing arguments directly through the command line when invoking the batch file.Example:

Copy.Bat Homework1.txt Homework2.txt
Echo OriginalFile: %1
Echo NewFile: %2
Copy %1 %2

In this case, %1 and %2 will be replaced with the file names Homework1.txt and Homework2.txt when the batch file is executed, performing the copy operation and effectively creating Homework2.txt.

If/Else Statements in Batch File

The If/Else construct is a fundamental conditional statement that allows batch files to perform different actions based on specific conditions. Example:

if (condition)
(do something)
else
(do something else)

Using If/Else statements alongside variables allows for the development of dynamic and responsive batch files capable of executing multiple tasks, including but not limited to copying files, renaming files, or creating new ones based on input criteria.

Hard Drives

TrackA track is a circular path on a magnetic disk where data is recorded and read. Tracks are divided into sectors and are arranged concentrically on the disk platters, playing a crucial role in organizing data. Each track has a unique identifier that allows the read/write head to locate it during data retrieval or storage. Tracks vary in density, which can affect the amount of data each can hold depending on the technology used in the hard drive.

HeadThe head, or read/write head, is the component in a hard disk drive that hovers just above the disk surface and is critical for accessing data. Each platter typically has two heads—one for each side. The heads read binary data as the platters spin and write data by changing the magnetization of the disk surface. Precision in the positioning of the heads is vital, as any contact with the platter can cause data loss or damage.

PlatterPlatters are the circular disks inside a hard drive where data is stored magnetically. Modern hard drives typically contain multiple platters stacked on a spindle that spins at a constant speed. The platters are coated with a magnetic material that retains data in binary form (0s and 1s). The size, material, and number of platters can significantly influence the storage capacity and performance of the hard drive.

Actuator ArmThe actuator arm is a mechanical arm that moves the read/write head across the platters to access different tracks. It is controlled by a voice coil motor, allowing for rapid and precise movement. The effective operation of the actuator arm is essential for the efficiency of data retrieval and storage, as it can quickly adjust the head's position to minimize seek time (the time it takes to move to a particular track).

ClusterA cluster is a group of one or more sectors that the operating system uses as the smallest unit of data storage on a disk. The size of a cluster can vary based on the file system in use and influences storage efficiency. Each time a file is saved, it occupies at least one cluster, which can lead to wasted space if the file does not fully fill the available cluster size. Clustering is crucial in optimizing disk performance and file system management.

Disk SectorA disk sector is the smallest unit of storage on a hard disk drive. Typically, a sector holds 512 bytes or 4096 bytes of data. Sectors are a subdivision of tracks, and they are essential to the reading and writing processes, as the drive controller accesses individual sectors based on file requests. When data is read from or written to a disk, it is done in sectors, making them fundamental in data management and access.

Track SectorA track sector refers to a specific sector within a track. Each track can be divided into multiple sectors, and the organization of these sectors within a track facilitates orderly data access and file storage. The layout of sectors impacts how quickly data can be retrieved, as the drive mechanism must navigate to the correct sector and track for reading or writing operations. The logical addressing of track sectors helps with the efficiency of data retrieval routines.