Chapter 16: Working with the Command-Line Interface

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

super user or root privileges

- Both Mac OS X and Linux gives you the ability to run the command line with advanced privileges, called:

tilde, ~

- By default Mac OS X and Linux do not show the path like Windows. - They only show a: - Means your a home user. - Example: mike@server: ~$

Example of a Windows command prompt

- C:\Diploma\APLUS> - Focus is on the \Diploma\APLUS\ folder of the C: drive.

ls command / Stands for list storage

- In Mac OS X and Linux, this shows you the contents of the directory where the prompt is focused. - Means what files you have with you.

rm command

- In Mac OS X and Linux, you can use the _________ command to delete both files and folders.

PowerShell

- In Windows you can replace cmd.exe with:

Example of focus and root directory

- In Windows, if you see a prompt with the following line, you know that the focus is on the root directory of the C: drive. C:\>

dir command

- In Windows, this shows you the contents of the directory where the prompt is focused. - Means show me what is in here. - By typing this command and pressing enter you see something like this:

./ called "dot-slash"

- In order to make Linux run the executable, you need to add a period and a slash in front of the executable to make it run.

Relative paths

- Instead of staring the path with a \, you can just type the name of the directory. - It is where you get to something from where you are right now. - Example: You could go to the C:\Obiwan directory from the root directory simply by typing cd obiwan at the C:\> prompt. - You then move one level at a time. C:\>cd Obiwan C:\Obiwan>cd my C:\Obiwan\my>cd hope

/s

- Is a switch that is used to delete a directory as well as all files and subdirectories. - rd followed by the _____ switch is handy but dangerous because it's easy to delete more than you want.

Linux

- Is case sensitive. - Example: It's perfectly acceptable to have two folders called "Mike" and "mike" inside the same folder. WINDOWS DOES NOT ALLOW THIS.

Command Prompt

- Is just another way to interface with a computer. - Interprets input and sends it to the OS in a form the OS understands, and then shows the results. - When you open a ________ _______, you start a shell.

rm command -r switch

- To remove a folder and all of its contents in Linux and Mac OS X, use the ______ command. - To delete a directory as well as all files and subdirectories use ___ with the _____ switch. - the -r switch shows all directories and subdirectories and MEANS TO GO TO EVERY FOLDER mike@server: ~$ rm -r practice

cd\

- To return to the root directory: - Most important command with the backslash and takes you to the Root Directory.

Type dir

- To see the contents of the optical disc or flash drive.

VSZ:

- Total paged memory in kilobytes is what output of the ps aux command?

kill command

- The command used to kill or terminate a process. - Example: The following command will stop the process with the PID 2218: mike@server:~$ kill 2218

ps command

- The command used to obtain information about processes currently running on the system. (On Mac OS X). -

Terminal

- The command-line in Mac OS X and Ubuntu Linux is called: - To open in Mac OS X, launch the Terminal app from the Utilities folder (located in the Applications folder) or activate spotlight, type terminal, and press ENTER.

Prompt

- The computer tells you its ready to receive commands by displaying a specific set of characters called a: - Example: >: Want to play a game? >: __ > this is a prompt > it is for user input.

cmd.exe

- The default Windows shell is:

: .

- The dot and double dots above the directories are like the trail of bread crumbs that your file system uses to keep track of which folders are connected to what.

path

- The exact location of a file is called its: - They are also used by Mac OS X and Linux but instead use a forward (/) slash.

period, or dot

- The filename and extension are separated by a: - Example: thisfile.txt

package index

- The first bit of business to get out of the way is to have APT go and update its: - It is the list of all the available packages (software). - Once APT's index has been updated, you install by typing: mike@server:~$ sudo apt-get install vim - If you want the newest version of vim after you install it you can type: mike@server:~$ sudo apt-get upgrade vim

RSS:

- Total physical memory in kilobytes is what output of the ps aux command?

same name

- Two files in the same folder cannot have the:

exist

- Two or more files with the same name can ________ in different folders on a PC.

different

- Two subfolders under ________ folders can have the same name.

cmd

- Type command in the search bar or start screen to access the Command-Line Interface.

How to delete a single file in Windows

- Type the del command followed by the name of the file to delete. - Example: to delete the file reportdraft1.docx, type: del reportdraft1.docx

How to delete a single file in Mac OS X and Linux

- Type the rm command followed by the name of the file.

dir /?

- Typing this command in Windows lists all possible switches for the dir command.

dir /w

- Typing this command shows only the filenames, but they are arranged in five columns across your screen. - Gives you the total number of directories there is.

ps | less

- Use this command to make it easy to scroll up and down through the output of processes.

/s and /e

- Use this switch to use robocopy like xcopy.

%MEM:

- What percentage of memory this process is using is what output of the ps aux command?

add the name

- To describe a particular directory, ________________ of the directory. - Example: if a PC has a directory in the root directory called Test, it is C:\Test.

backslash (\)

- To describe the root directory, put a ______ after the C:. - Example: C:\

sfc /?

- To familiarize yourself with sfc's switches, enter:

ls s* -1

- To find everything that starts with the letter s in using wildcards with Mac OS X and Linux, you type the command:

md command

- To make a directory in Windows, use:

Type cd

- To move the focus to any folders on the optical disc.

Use the cd command

- To point to its drive.

Examples of Mac OS X and Linux paths

- /usr/local/bin - /Applications/Utilities - /home/mike/Desktop

hostname command

- A command used to display and change the host name of a computer.

subfolder

- A folder inside another folder is called a:

move command in windows

- Copies the files, then deletes them from the SOURCE.

shutdown command

- Enables you to shutdown a local or remote computer. You can also reboot it if you want. - A Network admin can use this tool to restart a computer remotely. - Example: shutdown /r /m \\devserver - Can see full syntax for shutdown by typing: shutdown /?

ifconfig command

- Enables you to view and change the settings for your network connections.

Mike's Five-step copy/move Process

- Example 1: Step of copy/move process

Mike's Five-step copy/move Process Ex.2

- Example 2: Copying file to a USB thumb drive (E:).

Mike's Five-step copy/move Process Ex.3

- Example 3:

You can place the wildcard anywhere in the name

- Example: To delete all files with the filename "config" in a Windows directory, type del config.*

The grep command

- Handiest of all Linux commands. - We use this command to search through text files or command output to find specific information or to filter out unneeded information. - Finding a specific process is easy using grep with the ps command. - Example: Let's say I have a LibreOffice document that I need to kill. I have no idea what the PID is, but I can use grep with ps to find it. I know the command uses the word "libre," so I type

Jumping multiple directory levels

- How to jump multiple directory levels in one step: C:\>cd Obiwan\my\hope C:\Obiwan\my\hope> - JUMPING ALSO WORKS IN Mac OS X and Linux, but you need to use a forward slash.

man (manuel)

- In Mac OS X or Linux, type the command _________ followed by the command you're interest in: man [command name]

ls | more

- In Mac OS X or Linux, you can get the same result as dir /p by typing:

/Volumes

- In Mac OS X, these folders are most often mounted to a single folder off the root drive called:

/Volumes folder

- In Mac OS X, you need to look in the ______________ to move between drives in Mac OS X.

/media/<user name>

- In Ubuntu Linux, you need to look in the _______ folder for removable media.

/mnt folder

- In Ubuntu Linux, you need to look in the _________ drives to move between drives in Linux.

TIME:

- Length of time process has been running is what output of the ps aux command?

Deleting directories with the /s switch

- Let's delete the practice and games directories with rd followed by the /s switch. - Because the practice directory is in your home directory, point to it with cd\Users\<your username>. - Now execute the command rd practice /s and then you will get an options for y or n? - Press Y and they are eliminated.

case sensitive

- Linux and Mac OS X are:

color-coded

- Mac OS X and almost all versions of Linux come with ___________ command lines. - Can be green coded but it varies.

extension

- Mac OS X or Linux executable programs don't rely on any kind of _________ such as .exe in Windows. - Any file can be given the property of executable.

Forward slash (/)

- Mac OS X use a ________.

Exam Tip

- Many Linux systems disable the root account for safety, rendering the su command inoperable. - The sudo command enables users to do root things without having the root password.

/e switch

- Tells xcopy to copy empty subdirectories.

syntax

- The proper way to write a command is called: - Example: [command] [target (if any) ] [switches] or [command] [switches] [target (if any) ]

robocopy [source] [destination] [options]

- The robocopy syntax is:

ZZ (UPPER CASE)

- To save your new file and quit vi, type ____ and press ENTER.

Case sensitive

- Windows and Mac OS X are not:

If you want to go up a single directory level

- type cd followed immediately by two periods. - It's like a go back button. - Example: if you're in the C:\Obiwan\my directory and you want to move up to the C:\Obiwan directory, you can type cd .. and you'll be there: C: \Obiwan\my>cd .. C: \Obiwan>

Closing the Terminal

- At the prompt just type exit and the terminal window will disappear. mike@server:/home$ exit

format /?

- Best way to familiarize yourself with format command and its available switches is simply to enter:

CTRL-R

- A special key in Mac OS X and Linux terminal that searches your history of the commands you were working on in the past.

Individual file

- All OSs manifest each program and piece of data as an:

hierarchical directory

- All OSs use a _________ __________ tree to organize the contents of these drives.

folders or directory

- All files are put into groups called ______ and you'll often hear techs use the term ______. - Just files that contain more files.

mike@server:~$ sudo apt-get update mike@server:~$ sudo apt-get upgrade

- All it takes to upgrade all the packages on your system is to type: - If apt-get finds any out-of-date packages, it will let you know which ones and ask you to confirm the upgrade, then away it goes to download and update you system.

mounting

- All other storage-----partitions, optical discs, thumb drives, and etc, must go through a process called _______ to enable the OS to just treat them as folders.

passwd command

- Allows you to change your password or, if logged in as a root (the super user), any user's password. To change your own password, type the following: mike@server:~$ passwd changing password for mike (current) UNIX password: Enter new UNIX password: Retype new UNIX password Passwd: password updated successfully

Command mode

- Allows you to give commands such as cut, paste, delete line or characters, and save the file. - By default, you are in the command mode. - Press ESC key to go into command mode.

Insert mode

- Allows you to insert and edit text. - Press I to get into insert mode.

12/31/2016 10:18 AM <DIR> Windows

- Any entries that look like this are folders: - The dir command lists the CREATION DATE, CREATION TIME, <DIR> to tell you it is a folder, and the folder name.

root directory

- Any file not in a folder within the tree-----that is, any file in the folder at the root of the directory tree is said to be in the:

Executable programs

- Are programs that are not built-in.

xcopy

- Command in the command-line interface used to copy multiple directories at once, which the copy command could not do. - Copies files and folders in one command. - Has extra switches that give it the power to work with multiple directories. - It works on directories, so you don't have to use filenames as you would in copy. - Example: Let's say I have a direc- tory called Logs in the root of my C: drive. The Logs directory has three subdirectories: Jan, Feb, and Mar. All of these directories, including the Logs directory, contain about 50 files. If I wanted to copy all of these files to my E: drive in one command, I would use xcopy in the following manner: xcopy c: \Logs e: \Logs /s - Example: xcopy *.* d: /s means copy every subdirectory and the empty ones also.

rmdir or rd

- Command line to remove a directory. - You have to 1st get to the directory that contains the subdirectory you want to delete, and then execute either:

EXAM TIP for movie command in Mac OS X or Linux

- Comptia a+ listed mw rather than mv as the move command.

mkdir command

- Creating folders in Mac OS X and Linux is identical, but you must use the:

rm *

- Deletes all files in a directory in Linux.

Tree command

- Displays all directories and subdirectories in a tree fashion and helps find stuff.

file on the drive

- Each file has a name, which is stored with the:

Format command

- Enables you to format volumes from the command line.

Quotes

- File and directory names with spaces need to be in:

extensions

- Files aren't required to have __________, but in most cases the OS won't know the file association type without an: - It is the address of the file and what kind of file we are dealing with .exe / .pdf

spaces

- Folders and files may have _______ in their names.

package managers

- Give you the ability to download and fully install and update software from a single command. - It is used to manage all the software (minus the stuff you compiled yourself) on the system and are the tool that you use to keep the whole system up to date.

iwconfig command

- Gives you all the wireless details about your wireless NICs.

Example of starting a program

- Go to the C:\Windows\System32 folder. - Type dir /p to see the files one page at a time. - You should see a file called mmc. exe - To run the mmc.exe program, type the filename mmc and press ENTER. (YOU DON'T HAVE TO TYPE THE NAME .EXE EXTENSION AND YOU CAN IF YOU WANT).

Wiping a disk

- I have a drive (sdb) that I want to totally wipe. The dd command can take input from anywhere, but in this case I'll use Linux's random number generator, /dev/urandom, to write a stream of random bits completely over the entire drive. It's not a perfect wipe, but it will stop all but the most sophisticated tools. dd if=/dev/urandom of=/dev/sdb

dir /p (pause)

- If a lot of text scrolls quickly down the screen in Windows, try typing ___________ and then press Enter. - It is a lifesaver when you're looking for something in a large directory.

su

- If system doesn't have sudo, you typically type _____ at the prompt and press ENTER; you will then be prompted for the root password. - Once you have successfully entered the password, the prompt will change from a $ to a # and every command you enter from then on will be executed as root.

C:\Test\System\test2.txt

- If the C:\Test\System directory includes a file called test2.txt, it is:

help

- If you can't figure out a command, type ______ at the command prompt for a list of commands you may type.

Empty the directory

- If you want to delete a directory that contains files or subdirectories you must first:

/?

- If you want to find out the syntax and switches used by a particular command, in Windows type the command followed by ______ to get help. - Switch with options at the end of commands to do something special. - [command name] /?

association

- If your running Windows, Mac OS X, or Linux, the extension is very important as it's the filename's extension that tells the OS what type of program uses this data. - This is called the file's:

/media

- In Linux, these folders are most often mounted to a single folder off the root drive called:

forward slash: /

- In Mac OS X and Linux the only disallowed character is a:

cp and mv

- In Mac OS X and Linux, the copy command is ___ and the move command is ___.

A wildcard

- Is one of two special characters that you can use in place of all or part of a filename, often so that a command-line command will act on more than one file at a time. - Means only and all characters. - They work with all command-line commands that take filenames. - Example: The dir command. When you execute a plain dir command, it finds and displays all of the files and folders in the specified directory; however you can also narrow its search by adding a filename. - If you type the command dir ailog.txt while in your root (C:\) directory, you get following result. - Example: type: copy *.doc d: and then hit enter.

The ~

- Is really just a shorthand for your users folder; in this case it means you are in /home/mike.

Directory

- It is also called a folder!

SPACEBAR

- Just press ____________ to display the next screen.

To edit an existing file in vi

- Just type vi followed by the name of the file you wish to edit. - If you wanted to edit the Fred file, for example, you would type: mike@server:~$ vi fred

CTRL+C

- Keyboard shortcut for a break and stops the running command.

Using cp and mv for Linux

- Let's say we have a folder called /home/mike/Backups. The Backups folder has ten subfolders and hundreds of files. I want to save a copy of these files to a folder called /mnt/storage. To do this I only need to run cp with the -R (recursive) switch (note that the ~ in my prompt shows that I'm in the home folder): mike@server:~$ cp -R Backups /mnt/storage - If I want to move all of that to storage instead of copy, I use the mv command. Interestingly, the mv command doesn't even need a special switch—just run the program, pointing at the folder of interest and giving it a destination: mike@server:~$ mv Desktop/Backups /mnt/storage - Copy leaves the SOURCE files alone.

Copying a Hard Drive

- Let's say you have a hard drive (sda) you want to copy onto another hard drive (sdb). In this case we will say they are exactly the same size. The following command will copy the entire sda drive, partition table, file systems...everything to the sdb drive: dd if=/dev/sda of=/dev/sdb

Backing up a thumb drive

- Let's say you have thumb drive full of important files you really want to back up. Using dd as follows, you can copy the entire USB drive and make an image file (I chose to call it thumbBackup.bak) and place that image file on your Desktop:

user and system; directory

- Linux prompts show the currently logged-on ______ and ________ as well as the current __________.

APT, the advanced packaging tool apt-get is the command-line tool

- Linux-based UBUNTU uses: - You need to know the name of the package before you wish to install with apt-get. - To download and install this program, you start by typing: mike@server:~$ sudo apt-get update

root

- Mac OS X and Linux don't use the idea of drive letters, but instead the boot partition is defined as the _________ drive, shown as just a slash: /.

built-in and executables

- Mac OS X and Linux have 2 very different types of executable file types called:

pwd

- Mac OS X and Linux provide a handy utility called _______, that tells you exactly where you are if you're unsure. - Example: mike@server: ~$ pwd /home/mike

mounted

- Mac OS X and Linux systems don't use the Windows drive lettering concept; all forms of storage are simply __________ as folders.

absolute paths

- Meaning we have been typing out the entire path of a directory we are changing to.

cd command

- Means Change directory. - Works in every OS. - You use this command to change the focus of the command prompt to a different directory. - Points to a different folder. - Example: In Windows, to go to the Obiwan directory in the root directory, you type cd \obiwan and then press Enter. - Example 2: You could type cd obiwan\my\hope from a C:\prompt, and the prompt would change to C:\obiwan\my\home>----

$ symbol

- Means you are a standard user and have regular privileges. - Cannot enter a command here and run it as administrator unless you switch to administrator or use the command in the account.

Microsoft PowerShell

- More powerful replacement for the traditional Windows command-line interface.

COMMand:

- Name of the executable that created this process is what output of the ps aux command?

filename and the extension

- Names are broken down into two parts: the:

subfolders

- No two _______ under the same folder can have the same name.

bash

- On Mac OS X & Linux distros, the default shell is called:

kill

- One of the many reasons we run ps is to determine the PID for a process we want to:

How to get the prompt to "point" to another drive

- Point refers to "switch its focus" - Just type the drive letter and a colon. - Example: C:\Users\mike>e: E:\> - Type C: to return to the C: drive.

robocopy

- Powerful command-line utility for copying files and directories, even over a network fully replicating the structure on the destination system and deleting anything on that system that wasn't part of the copy. - A faster more robust copy. - Can copy encrypted files and enables an administrator to copy files even if the administrator account is expressly denied access to those files. - Will also resume copying after an interruption, and do so at the spot it stopped. - Example: C:\users\studio>robocopy .\documents d: /e /s - The dot in the syntax means from here in studio grab everything in documents

Using special keys in Windows for commands

- Press F1 key brings back the previous command one letter at a time. - Pressing F3 brings back the entire command at once. - Up Arrow Key shows history of all your old commands. -Right Arrow key to add /p to the end of your dir command.

dd command

- Primarily used to create an exact, bit-by-bit image of any form of block storage, meaning mass storage devices such as hard drive volumes, thumb drives, and optical media. In its most simple form, the dd command is just:

Invalid partition table

- Problems with the boot sector.

/d switch

- Processes all folders for all directories.

Clicking Icons

- Running commands from the _____ _______ is similar to clicking icons in the OS's GUI. - You tell the computer to do something and it responds.

STAT:

- S= waiting, R= running, 1= multithreaded, += foreground process is what output of the ps aux command?

Shutdown

- Same as in Windows, you can shut down or restart the system from a terminal using the shutdown command. You run the command as follows: shutdown <options> <time> - By far the most common time is now. To shut the system down immediately, type shutdown now To restart the system, run shutdown with the -r option: shutdown -r now

sfc command (System File Checker) or sfc.exe

- Scans, detects, and restores important Windows system files, folders, and paths. - Commonly used when Windows is not working correctly and use it to find and fix critical Windows system files that have been corrupt. - Used to correct corruption.

Running a program in Windows command line

- Simply change the prompt focus to the folder where the program is located, type the name of the program, and then press Enter.

spaces

- Some commands require _________ between the command and switches, so get into the habit of putting ______ between your command and switches and you won't run into problems.

backslashes and names

- Subdirectories in a directory are displayed by adding: - Example: If the Test directory has a subdirectory called System, it is shown like: C:\Test\System - This naming convention provides for a complete description of the location and name of any file.

dir *.txt

- Suppose you want to see the files with the extension .txt. - You use the * wildcard: - Replace the part of the filename with an (*).

/r switch with shutdown

- Tells shutdown to have the computer reboot rather than just shutdown.

%CPU:

- The What percentage of CPU power this process is using is what output of the ps aux command?

The rmdir/rd

- The ______ command alone will not delete a directory if the directory contains files or subdirectories.

ps aux command

- The aux command is 3 switches: 1. a=processes for all users 2. u=show process owner 3. x=process not attached to a terminal - One of the problems is its enormous output.

Root

- The base of a file system.

cd /

- The change directory in Mac OS X/Linux.

focuses, working directory

- The command prompt always ________ on a specific folder, the ________ __________, usually indicated by the prompt. - The OS executes commands in the specified folder unless otherwise directed.

Example of using PowerShell in Windows

- The following command will find all the JPEG files in the current directory, plus all the mentions of .jpg files in any document format, such as Word, PowerPoint, and Acrobat: Get-ChildItem . -Include *.jpg -Recurse -Force - Get-ChildItem / is the main command. - The dot . / indicates the current directory. - -include / tells the command to fetch the file type indicated next in this case *.jpg. - -Recurse / means to go into every subdirectory. - -Force / retrieves hidden and system files.

Example of the robocopy command in action

- The following command would copy all files and subfolders from a local machine's D:\testserver\website folder to a shared folder on the remote server \\liveserver\website.

/s switch

- The most commonly used of all of the many switches that come with xcopy, tells xcopy to copy all subdirectories except for empty ones.

asterisk (*) and question Mark (?)

- The one of two special wildcard characters are: - If you just want to confirm the presence of a particular file in a particular place, this is very convenient.

* " / \ [ ] : ; | = ,

- The only disallowed characters in Windows are the following eleven:

C:\Test\System

- The path for test2.txt file is:

PID:

- The process ID number assigned to the process is what output of the ps aux command?

C:\>_dir

- The space between > and dir tells DOS to move on to the next thing.

TTY:

- The terminal that is taking the processes output is what output of the ps aux command?

Command-line interpreter / known as the SHELL

- The tool that interprets input is called the: - The Shell acts like the:

drive and folder

- The trick to using a command line is first to focus the prompt on the ______ and _______ where you want to work.

insert mode or command mode

- The vi editor uses a non-intuitive "mode" concept where the editor is always in either:

pipe

- The | symbol is called a: - Means you are telling the OS to take the output of ls and, instead sending it directly to the screen, "_______" it through a second command called more. - works in all 3 OSs and is very powerful.

lo

- These are special terms to define network connections in Mac OS X and Linux: loopback.

eth0, eth 1, en0, en 1

- These are special terms to define network connections in Mac OS X and Linux: wired Ethernet NICs.

wlan0, wlan1

- These are special terms to define network connections in Mac OS X and Linux: wireless 802.11 NICs.

/mount

- These folders are most often mounted to a single folder off the root drive called:

bootrec

- This command repairs your Windows installation. This tool can troubleshoot and repair the MBR, the boot sector, and boot configuration data. - You'll need to boot the computer from the Windows Installation disk to access this utility.

chkdsk (CheckDisk)

- This command scans, detects, and repairs file system issues and errors. - You can run the chkdsk utility form a command prompt with the switches /f and /r. - To run successfully, chkdsk needs access to a drive. - The drive needs to be "UNLOCKED". - See figure on the options you get when your drive is not unlocked.

The rd command

- This remove command only works with Windows.

The rmdir command

- This remove command works equally well in both Windows and Mac OS X.

/w

- This switch gives you less detail and wide, more files and folders on screen.

/p

- This switch shows a page at a time.

/f switch

- This switch used with the chkdsk command attempts to fix file system related errors.

/r switch

- This switch used with the chkdsk command attempts to locate and repair bad sectors.

mike@server: ~$ sudo iwconfig wlan0 essid "AnotherSSID"

- To change the SSID for wlan0 to Another SSID, you would type:

How to create a new directory

- To create a directory called practice under your user's folder, open a new command prompt window or cd to your users folder at \Users\<your username>. Should see prompt C:Users\mike> - Now the prompt points to the C:\Users\mike directory, type md practice to create the directory: C:\Users\Mike>md practice

How to create a subdirectory file

- To create a files subdirectory in the practice directory, first use the cd command to point the prompt to the practice directory: Example: C:Users\mike>cd practice C:Users\mike\practice> - Then run the md command to make the files directory: md files

*.* (star-dot-star)

- To delete all of the files in a directory, you can use a dangerous but useful wildcard command: - The dot means everything--move or copy everything. - Example: del *.* - One of the few commands that pops up with an ARE YOU SURE OPTION WITH (Y) or (N)?

rm

- To delete files in Mac OS X and Linux you use the _____ command.

del (or erase)

- To delete files in Windows, you use the ______ command.

Recycle bin

- When deleting from the command-line, there is no: - "CHECK TWICE AND DELETE ONCE."

letter and a colon

- When describing a drive in Windows, you use its: - Example: C:

START:

- When the process was started is what output of the ps aux command?

Q key

- When you are done reading the manual, press the ____________ to quit back to the prompt.

echo $PATH

- When you run a program from a Linux command line, Linux first looks through a series of folders called the path and you can see the path by typing the command:

dir command entries

- When you type a simple dir command, some of the entries look like this: - Example: 09/04/2016 05:51 PM 63,664 photo.jpg - All these entries are files. - dir command lists the CREATION DATE, CREATION TIME, FILE SIZE IN BYTES, FILENAME, and EXTENSION.

sudo

- Whenever you need to run a command as root, type _______ followed by the desired command. - The system will prompt for a password and then run the command.

pruning and grafting

- Where you can grab a folder, complete with all of the subfolders and any files that might be anywhere in any of the folders, and copy or move the whole "pile" in one command. - If it is done properly, it is faster and gives you much finer control of the process.

USER:

- Who is running this process is what output of the ps aux command?

filenames

- Wildcards also substitute for parts of: - The dir command will find every file that starts with the letter a:

gpupdate

- Windows command for making immediate group policy changes in an individual system.

rd

- With Windows we only use _____ command to delete directories. IT WILL NOT DELETE FILES.

del

- With Windows we only use _____ command to delete files; IT WILL NOT REMOVE DIRECTORIES.

switch or option

- You can call up a modification by using an extra letter or number, called a ________, which may follow either the command or the target, depending on the command.

mike@server: ~$ ifconfig eth0 down

- You can disable a NIC using the following.

Run as administrator

- You can manually run a command with elevated privileges by right-clicking a command-prompt and then selecting:

mkdir

- You can use this command that works in all OSs and is identical to md.

mike@server: ~$ sudo ifconfig wlan0 192.168.4.15

- You can use this command to temporarily change any IP setting with ifconfig. - This computer will set the IP address of a wireless NIC to 192.168.4.15 until the computer is rebooted:

multiple files

- You can use wildcards with the del and rm commands to delete: - Example: to delete all files with the extension .txt in a folder, you can type this in Mac OS X/Linux: rm *.txt

About cd command

- cd into the directory to make stuff from within the directory like folders.

bootrec /fixboot

- command that writes a new boot sector.

vi

- is the default text editor, built-in to Mac OS X and most distros Linux. - Start vi by creating a new text file called "Fred": mike@server:~$ vi fred

Example of a Mac OS X and Linux prompt

- mike@server:/home$ - Prompt shows USER Mike in on the "server" system and is in the home directory.

Example of rm command using the -r switch

- rm command being used with the -r switch to delete the folder Jedi as well as all of its contents. rm -r Jedi

cmdlets

- specialized commands for completing common tasks in PowerShell.

/mir

- switch, for mirror, tells robocopy to copy everything from the source and make the destination mirror it. - Means robocopy will also delete anything in the destination that doesn't match the source folders and files.

rd /s Jedi

- the Windows rd command that comes with a switch , /s, makes it act identically to the rm -r command:

ls with the -1

- using ___ with the ___ switch in UNIX commands , stands for long listing, gives detailed information about all the files: $ ls -1 -rw-rw-r-- 0 mike 2313443 Jun 13 15:27 photo.jpg

user folder

- when you open a command-line window in Windows, it opens focused on your:

CLS command

- will clear the screen of all data


Kaugnay na mga set ng pag-aaral

Anthropology 204- Language and Culture Exam

View Set

Science 1083, 4th Edition, 2nd Checkup

View Set

Final Review Quizzes/Exam Questions

View Set

Fundamentals of Nursing- Quiz 2 (Exam 1 Material)

View Set

STS OR Real Estate Section 2: Agency

View Set