Week 1 - Set #1 - Basic Commands - Intro to OS - Becoming a Power User

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Windows command line interfaces (CLIs)

1) Command Prompt, cmd.exe 2) Powershell Prompt, powershell.exe

ways to create spaces in file names in the shell

1) put the name in single quotes like 'my cool folder' 2) use backticks like my` cool` folder

ways to create spaces in file names in Bash (Linux)

1) use backslash \ Example: mkdir my\ cool\ folder 2) use quotes Example: mkdir 'my cool folder'

echo command

A command used to display or echo output to the terminal screen. It might utilize escape sequences.

Recycle Bin

A holding area for files and folders before their final deletion from a storage device; is usually a hidden file.

child directory

Another term for a subdirectory

shortcut for getting to a folder under parent directory

Example: cd ..\Desktop rather than typing out the whole thing

cd ~

The tilde is a shortcut for the path of your home directory

wildcard

a character that's used to help select files based on a certain pattern

parent directory

a directory that holds other directories

parameter

a value that's associated with a command

flag

a way to specify additional options for a command

-a

all

ls command, -Force

all the hidden files in the directory

how do you hide a file or folder in linux

by pre-pending a dot to it. example: .I_am_hidden.

shortcut to get to the desktop directory of the home folder (or directory)

cd ~\Desktop

cd

change directory command

clear command

clears the output on your screen

shell

command line interpreter in Linux

Program Files x86 directory

contains most of the applications and other programs that are installed in Windows users

How do you copy over the contents of a directory in PowerShell?

cp filename destination -recurse -verbose

What does the dot in front of the path of .\Desktop means

current directory

ls -l/

detailed information about files and folders in the format of a long list

/user

directory for user installed software

man ls

gives the same information for --help (what options are available for a command) BUT with more details

cd ..

go to the directory one level up

Program data

in general, this directory is used to hold data for programs that are installed in Program Files; is usually hidden file

hotkey

keyboard shortcut

Tab completion

lets us use the tab key to auto-complete file names and directories; type first letter of file and then hit tab until the correct file name appears; Note: In Linux, after using the tab you get a list to pick from rather than rotation through with additional tabs in Windows

shortcut Ctrl+R

lets you search through your previously used commands by typing bits and pieces of the command you want to look for

-l

list

ls

list directory contents command

ls C:\

listing the directories in the root of C: drive.

ls -la/ is the same as what command

ls -l -a (the first is combined)

root directory

main directory in Linux that all others stem from; uses forward \ which differs from windows

mkdir

make a new folder; example: mkdir my_cool_folder

What commands in Bash get you help?

man ls; ls --help

man command

manual command; used to show manual pages (called man pages in Linux)

Get-Help ls -Full

more detailed help; returns a description of each of the parameters and some examples of how to use the command

mv

move command; lets you rename or move a file

How do you move multiple documents from one directory to another in Windows PowerShell?

mv *.filetype destination folder Example: To move the documents to Documents folder: green_document.txt red_document.txt yellow_document.txt mv *_document.txt c:\users\Cindy\Documents

How do you move multiple documents from one folder to another in Linux?

mv *.filetype destination folder Example: To move the documents to Documents folder: green_document.txt red_document.txt yellow_document.txt mv *_document.txt ~/Desktop

How do you move one document into a different folder in Linux?

mv filename destination Example: Move a file called blue_document.tx into a folder called Documents. mv blue_document.txt ~/Documents

basic operating system navigation

navigating from one directory to another, getting file information, and removing files and directories

What does cp verbose do?

output one line for each file of the directory being copied

pwd

print working directory; tells you which directory you're currently in

-r

recursive command in Bash

rm

remove a file from a directory without it going to the recycle bin

Get-Help ls

returns the text describing the parameters of the ls command

How do you remove an entire parent folder and children files

rm folder -recurse Example: rm ~\misc_folder -recurse

file and text manipulation

searching through your directories to find a specific file, copying and pasting, chaining commands and more

Bash

shell, or command language interpreter, for the GNU operating system

history command

shows a list of commands that were input earlier; you can scroll through the list with the up and down buttons on the keyboard; once you get to a command you want, you can append it if necessary to make a new file

/var

stores system logs and any file that constantly changes in here

cp

the command in PowerShell to copy something

escape character

the next character after the back tick should be treated literally. In the example: my` cool` file, escaping the space tells the shell that the space after the back tick is part of our filename (in Powershell but escape character may be different for other programs)

relative path

the path from your current directory

absolute path

the path that starts from the main directory

/home

the personal directory for users; holds user documents, pictures, etc. and is similar to Windows users directory

What happens if you enter /ls without a directory name?

the system defaults to the directory you are currently in

/proc

this directory contains information about currently running processes

/bin

this directory stores essential binaries or programs; similar to our Windows program files directory

/etsy

this folder stores important system configuration files

-recurse

this parameter lists the contents of the directory

what do you do if you are using an older version of Powershell that does not support the shortcut Ctrl+R

type the # symbol followed by some part of your old command, and then use Tab completion to cycle through the items in your history.

how would you copy over all the .jpg files in a folder

use cp *.jpg, and the path you want to copy them to

-Force

used (if you have permissions as administrator) after using rm and getting an error message by the system; this should force the removal Example: rm C:\users\Cindy\important_system_file -Force

--help

view what options are available for a command


Set pelajaran terkait

Chapter 15 - Product and Pricing Strategies

View Set

Chapter 49: Neuromuscular or Muscular Dysfunction NCLEX

View Set

U.S. History - Organizing to Demand Rights

View Set

Chapter 14: Assessing Skin, Hair, and Nails

View Set

4.5b Preparing Solutions of Known Concentrations

View Set