Module 1, day 2 Flashcards
windows: list directories in a Gui ->linux: changing directories in Bash
files and folders
directories
What are organized in a hierarchical directory tree?
directories
in what type of directory organization do you have a main directory that branches off and holds other directories and files?
directory tree
What do you call the location of files and directories in a tree?
paths
What is C:\Users\Cindy\Desktop an example of?
a path
in Windows, what drive letters are file systems assigned to?
C, D, X
What are drive letters?
file systems
what are file systems used for?
keeping track of files on our computer?
What is the parent for all other directories in the file system?
Root directory
How would you write the root directory of C: and X:?
C:\, X:. Remember that it is back slash, not forward slash.
What are separated by backslashes?
Subdirectories in Windows.
What are separated by forward slashes?
Subdirectories in Linux
where does a path start?
the root directory of the drive
What is the main directory in a Windows system?
the drive that the file system is stored on
The path starts at where?
Local Disk (C:)
why are hidden files hidden?
we don’t want anyone to see or accidentally modify the files. could be critical system files or configs, or any files you want to hide.
how to see hidden files
go to the top of file explorer, click view, check the hidden items check box
what if you want to view information about a file?
right click and choose properties.
In file properties, where can you see the file name
in file properties, in the general tab
what is the size of the file in file properties?
the amount of data it takes up.
What is the size on disk?
the number of sectors the file occupies multiplied by sector size
in file properties, where can you see the type of file?
General Tab
in file properties, where can you see location path of the file
General Tab
in file properties, where can you see size of the file
General tab
In file properties, where can you see size on disk?
General tab
in file properties, where can you see timestamps of when the file was created, last modified, and last accessed?
General tab
in file properties, where can you see file attributes you can enable for a file?
General tab
How do you make a hidden file in file properties?
in the general tab, check the “hidden” box in attributes
in file properties, where can you see advanced options for file attributes?
General tab
Where can you go from file explorer to see things about files with tabs including general, security, details, and previous versions?
File Properties
What tab in File Properties basically tells us the same things as the General tab, but without ability to modify anything or look deeper?
Details tab
in file properties, where can you restore an earlier version of a file?
Previous versions
what do you see by default in file directories?
list of non hidden files and folders
Where can you change how you want to view your file systems and directories
in the tool bar at the top of the File Explorer app
What does recursive mean for a program?
it is operating on a directory and its contents
What is a naive algorithm?
a very simple Solution to a problem that has a very high time or high memory complexity
In a recursive directory search, what files won’t be counted in the total folder size?
subdirectories you don’t have access to.
what are file system objects used to extend the attributes of a file system?
reparse points
What does parsing mean?
analyse, break down, dissect, take apart
What does recurse mean?
of, relating to, or constituting a procedure that can repeat itself indefinitely
what size do symbolic links to files count as?
zero size, because the directory entry reports them that way.
what measurement is reported by the FindFirstFile function in the WIN32_FIND_DATA.nFileSizeLow and nFileSizeHigh
?
The Size Measurement in the properties sheet
For Size on Disk: If the drive supports compression (as reported by the FILE_FILE_COMPRESSION flag returned by the GetVolumeInformation function) and the file is compressed or sparse (FILE_ATTRIBUTE_COMPRESSED, FILE_ATTRIBUTE_SPARSE_FILE), then the Size on disk for a file is the value reported by the
GetCompressedFileSize function
For size on disk, what takes the compressed size of the file, if compressed, or the size of the file minus the parts that were de-commited and logically treated as zero.
GetCompressedFileSize function
What is Size on disk size if the file is neither compressed or sparse?
the file size reported by the FindFirstFile function rounded up to the nearest cluster
who developed the size on disk algorithm?
Windows 95 team
What was the only disk file system in the MS-DOS background of the Windows 95 team? Files stored in units of clusters
FAT
What file organization system can a file consume zero clusters for its data by stashing itself into slack space in the master file table?
NTFS
What does Size on Disk not take into account?
other file system overhead, disk space occupied by the file name itself, directory entry information, file metadata, alternate data streams
What is Size on Disk meant to be?
a rough estimate based on the assumption that most files have no hard links and a negligible use of alternate data streams.
When will values be way off for Size on Disk?
if you have a directory with numerous hard links, like the Windows Directory itself
What can you use as a sniff test to get a rough idea of the size of a directory, but which is a naive calculation?
Size on disk
What can you use if you need to keep careful tabs on disk consumption? Their purpose is to more intelligently track disk consumption.
Disk Quotas.
What are the CLI on Windows?
command prompt: cmd.exe
Windows PowerShell
What CLI is similar to the command prompt that was used in MS DOS?
cmd.exe, command prompt
What command line supports many of the same commands as the command prompt and more?
PowerShell
what CLI are we using in this course?
Windows PowerShell
What are many commands we’ll use in PowerShell aliases for?
common commands in other shells
What is like a nickname for a command?
alias
command for listing files and directories
ls- list directory
what drive is where the Windows Operating system is installed?
C: drive
How to navigate to the C drive in PowerShell
cd C:\
What is an example of a command parameter?
C:\ in <ls C:>
what do you see in the cli when you navigate to the C: drive?
all the directories in the root of your C: drive
What do we call a parent directory?
directories containing directories, like the C: drive root folderW
what do we call child directories?
contents inside parent directories.
what do parents and children tend to stand for?
hierarchical relationships in OS
if I have a folder called “cats” and a second folder nested in that folder called, “Maine Coon” , which folder is which?
Cats is the parent directory. Maine Coon is the child directory
What does Program Files (x86) contain?
most of the applications and other programs that are installed in Windows
What file contains the user profile directories or home directories?Windows
Users
What does each user on a Windows machine get?
a user directory in the Users directory
Where is the Windows OS installed?
The Windows directory
What happens if you open PowerShell and run Get-Help ls?
you’ll see the text describing the parameters of the ls command
What happens if you open PowerShell and run Get-Help ls -Full?
You will see more detailed help concerning the parameters of ls command. You’ll see a description of each of the parameters and command use examples.
How do you see all hidden files in a directory? in PowerShell
ls -Force C:\
What does the -Force parameter do?
shows hidden and system files that aren’t normally listed with just ls.
What does the Recycle function do?
move files to this Recycle directory, instead of deleting immediately,
ProgramData directory
used to hold data for programs installed in Program Files
what is the directory all other directories stem from?
root directory
What denotes the path to the root directory in Linux?
/
what is
/home/cindy/Desktop
an example of?
a path in Linux that starts from the root directory, just like C:\users\cindy\desktop in Windows.
in Linux, if you don’t provide a path, what will it default to?
the current directory
what directory can I mistake for the main directory in Linux?
the home directory, which is not the same as the root directory.
what does
ls /
show us in linux?
all the directories listed under the root directory.
what directory in linux stores our essential binaries or programs? Very similar to our Windows program files directory
/bin
where are commands we use located in linux?
/bin
what folder stores important system configuration files? linux.
/etc
what is the personal directory for users called in linux?
/home
what directory in Linux holds user documents, pictures, etc. similar to Windows’ User directory
/home
what directory contains information about currently running processes in Linux?
/proc
what directory in Linux doesn’t contain our user files, but is meant for user installed software?
/usr
Where do we store system logs and constantly changing files in Linux?
/var
What is a way to specify additional options for a command in linux, similar to Windows Parameters?
a flag
how do we specify flags linux?
using a hypen, then the flag option
<-flag> (usually. every command has different flag options)
how do you view what options are available for a command in Linux?
add the <–help> flag
what happens when you type ls –help?
you get information about ls, used for reference. This is help menu.
where do you find what format to put a command in, in Linux?
in linux at the top of the help menu. Usage:
Where in linux command help menu do you find what the command does/
under Usage.
Where in linux command help menu do you find the options you can use? Tells us what command flags are available, and what they do.
below the information that tells you what the command does, presented with the flag, – it’s definition, and what it does to the command.
what does man stand for as a linux command?
manual
what is man used for? linux
to show manual pages. Man pages.
how do you use the manual command to see man pages? linux.
run
man command you want to look up>
what will
man ls
command get you the same information as? linux.
ls –help
how do you make a directory list more readable? in linux
ls -l
What does
-l
stand for in linux? as an ls flag.
long
What shows detailed information about files and folders in the format of a long list?
ls -l
how do you see additonal information about the linux directory and the files and folders in them?
ls -l
what is the ls command in linux similar to in windows?
ls, dir
what shows us detailed file information?
ls -l
what is the first column in a list generated off of ls -l? linux.
file permissions.
what is the second column in a list generated off of ls -l? linux.
the number of links a file has
what is the third and fourth column in a list generated off of ls -l? linux.
the file owner, then the group the file belongs to
what is the fifth column in a list generated off of ls -l? linux.
file size
what are groups? linux
another way we can specify access to files
what is the sixth column in a list generated off of ls -l? linux.
time stamp of last modification
what is the seventh column in a list generated off of ls -l? linux.
file or directory name
what does -a stand for as a linux flag for ls?
all
what ls flag shows us all the files in the directory, including the hidden files? linux
ls -a
how can I append two flags together in the ls command in linux?
ls -l -a/
what determines the order a command goes in? linux
the order of the flags
does it matter if you do a long list first or show all files first in linux?
not in our case.
how do you hide a file or directory?
prepend a dot to it.
.file
what does prepend mean?
to add something to the beginning of something else
how do you change directory in the Gui on windows?
in file explorer, click on the directory you want to navigate to.
what is a path that starts from the main directory known as in Windows?
Absolute path
what is a path that starts from your current directory known as in Windows?
Relative path
where are you usually when you first open PowerShell?
home directory
in PowerShell, what shows which directory you are currently in?
your prompt
What command in PowerShell shows you what directory you are in?
pwd
what does pwd stand for in PowerShell?
print working directory
What command in PowerShell lets us change our directory?
cd, change directory.
how do you use cd properly? Windows.
cd directory we want to change to
What kind of directory path do you need to use to change directory? PowerShell
absolute directory, which spells out the entire path, or relative, which only uses part of the path, describing how we want to get somewhere relative to where we are.
what does
cd C:\Users\cindy\Documents
do? PowerShell
changes us to the Documents directory, using the absolute path.
What is the shortcut to get to the level above your current directory? The parent directory of the one you are in right now. in PowerShell
cd ..
What is a relative path that will take you up one level relative to where you are in PowerShell?
..
PowerShell, what directory are document and desktop directories under?
home
in PowerShell, to get to the Desktop directory from the Documents directory, what is an easier way to write this than the command
cd ..
cd Desktop?
cd ..\Desktop
what is cd ~ good for? PowerShell
change directory to home directory.
What does ~ mean? PowerShell
home
How can I get to the desktop directory in my home folder from anywhere?
cd ~\Desktop
What happens if you mess up while typing directory names? PowerShell
PowerShell has a built in feature called Tab completion, which lets us use tab to auto-complete file names and directories.
how do you use tab completion to get to another directory? PowerShell
you can press the first letter of the directory, and then tab, and the first file or directory starting with that letter will complete. You can keep pressing tab and the path will rotate through all the options that complete the name you started to type. You can also spell out more letters of the directory to get specific the first time.
what does the . in front of the path of
.\Desktop\ mean? PowerShell
current directory
how is navigating between directories the same in Bash as PowerShell?
The cd command is the same.
how do you change directory Linux?
cd path
what is
cd /home/cindy/Documents
an example of? linux
an absolute path in Linux.
what does .. do in linux?
go up a parent directory
What does tilde mean in Bash?
home
what does cd ~/Desktop do? linux
take us back to the desktop
what is the difference between tab complete in Bash and Windows?
if we have multiple options in Bash, it won’t rotate through the options. It’ll show all options at once as a way to show us how many fit that description.