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
Q

Do flags in Linux go before or after a command?

A

Flags go after the main command

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

What are the 2 different types of paths? Windows

A
  1. Relative
  2. Absolute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Describe the 2 different types of paths, how are they different? Windows

A
  1. Absolute - path starts from the main directory
  2. Relative - path starts from the current directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What windows command tells you what directory you’re in?

A

pwd

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

What does the pwd command stand for? windows

A

Print Working Directory

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

what command allows us to change the directory we’re in? windows

A

cd

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

to use the change directory command, what else do we need to specify?

A

the path/directory we want to change to

32
Q

What does an absolute path look like? windows

A

C:\user\vanes\documents

full path name

33
Q

What does a relative path look like? windows (Explain in more detail)

A

a relative path consists of directories that are relative to our location (close proximity)

34
Q

What’s the windows shortcut to go up one directory level?

A

cd ..

35
Q

What does a Windows relative path shortcut look like?

A

cd ..\directory
cd .\inthesamedirectory

36
Q

How do you use the windows relative path shortcut to get to the >home directory<?

A

cd ~

cd ~\Desktop

37
Q

What’s the name for this ~ symbol?

A

tilde

38
Q

Explain what tab completion is?

A

tab lets us autocomplete file names and directories

39
Q

What does seeing a dot in front of a file name mean?

A

means it’s the current directory

40
Q

What’s the Windows command to make a new directory?

A

mkdir

41
Q

How do you substitute spaces when creating a new directory file name? 3

A
  1. underscore
  2. single quote around file name
  3. Back tick after each file name word
42
Q

What’s the escaping character for PowerShell?

A

back tick

43
Q

What’s the escaping character for Linux?

A

back slash

44
Q

What’s the command to see a list of commands entered earlier?

A

history

45
Q

How do you scroll to a previous command generated from the history command?

A

arrow keys

46
Q

What’s the command shortcut to search through your history of commands?

A

ctrl + r

47
Q

What’s the command to clear the screen when it’s too messy with prompts?

A

clear

48
Q

What’s the command to copy a file? What else does it need? w

A

cp

cp (file name and extension) (path to copy to)

49
Q

What’s a wildcard? w

A

tells the computer to select multiple items (files) with similar patterns by using a character (like an asterisk)

like all *.pdfs, all *.jpgs

50
Q

How would you copy multiple files of the same type to another location? What does it look like? w

A

cp *.jpeg ~\filelocationtocopyto

51
Q

How would you copy a directory and its contents? Windows

A

cp ‘Folder Name’ C:\Root\Sub\Sub -Recurse -Verbose

52
Q

How would you copy a directory and contents in linux?

A

cp -r ‘directory name’ (location)

53
Q

What command to rename a file?

A

mv

Example for Windows:

mv .\FileToBeRenamed newfilename

(.\ as file is in the same directory and keeping it there)

54
Q

How do you keep the file you’re renaming in the same directory (not moving it)?

A

mv .\filename renamedfile

(Windows)

55
Q

How do you move multiple files? w

A

With a wildcard asterisk to target “patterns”

56
Q

How do you view a directory and then move a file from that directory?

A

cd to switch to desired directory cd .\foldername
ls to view files in directory
mv

57
Q

What would the command look like to move a document.txt into the documents directory from the desktop on Linux?

A

mv ‘document.txt’ ~/Documents

(works without single quotes too)

58
Q

What’s the command to remove a file/directory?

A

rm or remove

59
Q

What flag do you insert to bypass the PowerShell warning before deleting a directory that holds system or regular directory files? 2

A

-Force for system files
-Recursive for regular directories

60
Q

How do you remove a directory in Linux with a space in the folder name?

A

rm -r My\ TextFile

61
Q

What are the escaped commands for Windows and Linux? (spaces for files)

A

Linux backslash \
Windows back tick `

62
Q

What are the 6 main directory types in Linux?

A
  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
Q

A parameter is to Windows as ____ is to Linux

A

a flag

64
Q

How do you hide a file in Linux?

A

prepend a dot at the beginning of the filename

65
Q

What does a relative path command to go up one level look like?

A

it will take you up one level relative to where you are

cd ..

66
Q

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

A

cd ..\Desktop
or
cd ~\Desktop

67
Q

What is the shortcut for the path to your home directory on Windows?

A

cd ~\filepath

For example:

cd ~\Desktop
no matter how far you are from home directory

68
Q

PowerShell doesn’t understand ___

A

spaces

69
Q

What’s the escaping character used for Windows and Linux?

A

Windows = back tick `
Linux = backslash \

70
Q

What’s a shortcut to change directories to another directory in the current directory? Windows

A

cd .\directoryincurrentdirectoryname

71
Q

What’s the recursive flag for Linux?

A

-r

72
Q

When copying a file or directory what needs to go around the filename if you get an error?

A

single quotes (when copying, moving a directory) if copying/moving it without quotes doesn’t work

73
Q

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

A

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
Q

How do you move multiple files?

A
  • asterisk wildcard character
75
Q

On Windows, how do you remove an entire directory?

A

rm ~\foldername -recursive

76
Q

On Windows, how do you remove a file and bypass not having permission to remove it?

A

-Force parameter

rm C:\Users\vanes\important_system_file -Force