Week 1 - Intro to Operating Systems - basic commands Flashcards

1
Q

What are paths?

A

Paths are locations of files and directories

which path to take…. hmm…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are file systems? 3

A

File systems are the organization of files and directories, keep track of files, and are assigned to a drive letter

cabinet of files….each cabinet is a drive letter…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are root directories? What does it look like?

A

A root directory is the parent for all other directories in the file system

root….tree roots…to branches…

‘C:'

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are subdirectories separated by?

A

Subdirectories are separated by a backward slash \

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are Linux subdirectories separated by?

A

Linux subdirectories are separated by a forward slash /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which feature tracks disk consumption more accurately?

A

Disk Quotas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is ‘size on a disk’?

A

An estimate of a compressed file or size of the file minus parts that were taken away

If neither of those, then it’s the size reported by the FindFirstFile function rounded up

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What’s the difference between command prompt and PowerShell?

A

PowerShell does what command prompt can but can do much more

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the list directory command we used in PowerShell?
What’s a parameter you can add to the end of the line?

A

ls

ls C:\

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What’s a parameter?

A

a value you can add to a command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The C drive root folder is called a ______ and the contents inside are considered a ________

A

C Drive root folder is a parent directory and contents inside are the child directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which child directory contains most of the applications and programs installed on Windows?

A

Program Files (x86)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What command do we use to see a description of the ls command on windows? How do you get a more detailed version?

A

Get-Help ls

Get-Help ls -full

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command do you use to see all the hidden files in a drive? Windows

A

ls -Force C:\

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What directory is the main directory in a Linux filesystem?

A

Root directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a flag? Linux Is there an equivalent in Windows?

A

A flag lets us customize a command with a specific action

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How do you use a flag? Linux

A

A flag is used as a hyphen and then the flag command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What flag lets you view what options are available for a command? Linux

A

–help

(two hyphens)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What command in linux lets us see manual pages for commands we can use?

A

man

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Flags always contain ____

A

at least 1 hyphen in front

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What linux command allows us to view information in a long list format?

A

-l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Can you combine 2 flags together? How would that look like?

A

Yes
-l -a = -la

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What does the order of a flag determine?

A

The order of flags determines what order it goes in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How do you hide a file or directory in Linux?

A

put a dot at the beginning of the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Do flags in Linux go before or after a command?
Flags go after the main command
26
What are the 2 different types of paths? Windows
1. Relative 2. Absolute
27
Describe the 2 different types of paths, how are they different? Windows
1. Absolute - path starts from the main directory 2. Relative - path starts from the current directory
28
What windows command tells you what directory you're in?
pwd
29
What does the pwd command stand for? windows
Print Working Directory
30
what command allows us to change the directory we're in? windows
cd
31
to use the change directory command, what else do we need to specify?
the path/directory we want to change to
32
What does an absolute path look like? windows
C:\user\vanes\documents full path name
33
What does a relative path look like? windows (Explain in more detail)
a relative path consists of directories that are relative to our location (close proximity)
34
What's the windows shortcut to go up one directory level?
cd ..
35
What does a Windows relative path shortcut look like?
cd ..\directory cd .\inthesamedirectory
36
How do you use the windows relative path shortcut to get to the >home directory
cd ~ cd ~\Desktop
37
What's the name for this ~ symbol?
tilde
38
Explain what tab completion is?
tab lets us autocomplete file names and directories
39
What does seeing a dot in front of a file name mean?
means it's the current directory
40
What's the Windows command to make a new directory?
mkdir
41
How do you substitute spaces when creating a new directory file name? 3
1. underscore 2. single quote around file name 3. Back tick after each file name word
42
What's the escaping character for PowerShell?
back tick
43
What's the escaping character for Linux?
back slash
44
What's the command to see a list of commands entered earlier?
history
45
How do you scroll to a previous command generated from the history command?
arrow keys
46
What's the command shortcut to search through your history of commands?
ctrl + r
47
What's the command to clear the screen when it's too messy with prompts?
clear
48
What's the command to copy a file? What else does it need? w
cp cp (file name and extension) (path to copy to)
49
What's a wildcard? w
tells the computer to select multiple items (files) with similar patterns by using a character (like an asterisk) like all *.pdfs, all *.jpgs
50
How would you copy multiple files of the same type to another location? What does it look like? w
cp *.jpeg ~\filelocationtocopyto
51
How would you copy a directory and its contents? Windows
cp 'Folder Name' C:\Root\Sub\Sub -Recurse -Verbose
52
How would you copy a directory and contents in linux?
cp -r 'directory name' (location)
53
What command to rename a file?
mv Example for Windows: mv .\FileToBeRenamed newfilename (.\ as file is in the same directory and keeping it there)
54
How do you keep the file you're renaming in the same directory (not moving it)?
mv .\filename renamedfile (Windows)
55
How do you move multiple files? w
With a wildcard asterisk to target "patterns"
56
How do you view a directory and then move a file from that directory?
cd to switch to desired directory cd .\foldername ls to view files in directory mv
57
What would the command look like to move a document.txt into the documents directory from the desktop on Linux?
mv 'document.txt' ~/Documents (works without single quotes too)
58
What's the command to remove a file/directory?
rm or remove
59
What flag do you insert to bypass the PowerShell warning before deleting a directory that holds system or regular directory files? 2
-Force for system files -Recursive for regular directories
60
How do you remove a directory in Linux with a space in the folder name?
rm -r My\ TextFile
61
What are the escaped commands for Windows and Linux? (spaces for files)
Linux backslash \ Windows back tick `
62
What are the 6 main directory types in Linux?
1. /bin - essential binaries (commands, programs, like ProgramFiles Windows) 2. /etc - stores important system configuration files 3. /home - personal directory (pictures, desktop, documents, etc) 4. /proc - info about currently running processes 5. /user - user directory for user-installed software 6. /bar - stores system logs and any file that constantly changes
63
A parameter is to Windows as ____ is to Linux
a flag
64
How do you hide a file in Linux?
prepend a dot at the beginning of the filename
65
What does a relative path command to go up one level look like?
it will take you up one level relative to where you are cd ..
66
You're in vanes\Documents, you want to get to the Desktop which is up one level. What command can you use instead of cd.. then cd Desktop? Windows
cd ..\Desktop or cd ~\Desktop
67
What is the shortcut for the path to your home directory on Windows?
cd ~\filepath For example: cd ~\Desktop no matter how far you are from home directory
68
PowerShell doesn't understand ___
spaces
69
What's the escaping character used for Windows and Linux?
Windows = back tick ` Linux = backslash \
70
What's a shortcut to change directories to another directory in the current directory? Windows
cd .\directoryincurrentdirectoryname
71
What's the recursive flag for Linux?
-r
72
When copying a file or directory what needs to go around the filename if you get an error?
single quotes (when copying, moving a directory) if copying/moving it without quotes doesn't work
73
What's a shortcut when renaming a file to keep it in the same directory? It also indicates that the file name we want to change is in the same directory. Windows
mv .\bluefile.txt yellowfile.txt (blue being renamed to yellow but staying in the same directory and also indicating that the file name we want to change is in the same directory)
74
How do you move multiple files?
* asterisk wildcard character
75
On Windows, how do you remove an entire directory?
rm ~\foldername -recursive
76
On Windows, how do you remove a file and bypass not having permission to remove it?
-Force parameter rm C:\Users\vanes\important_system_file -Force