Podcast
Questions and Answers
What is the purpose of a file system?
What is the purpose of a file system?
What is the primary purpose of a current working directory?
What is the primary purpose of a current working directory?
The current working directory is the folder/directory where you are working at a given time.
Files are organized in __________ and subfolders.
Files are organized in __________ and subfolders.
folders
Match the following file types with their extensions:
Match the following file types with their extensions:
Signup and view all the answers
What command is used to change the current working directory in a command line interface?
What command is used to change the current working directory in a command line interface?
Signup and view all the answers
Which types of paths can be used with the 'cd' command? (Select all that apply)
Which types of paths can be used with the 'cd' command? (Select all that apply)
Signup and view all the answers
The command 'ls' is used in _____ to list the contents of a directory.
The command 'ls' is used in _____ to list the contents of a directory.
Signup and view all the answers
What is the parallel command to 'ls' in Windows?
What is the parallel command to 'ls' in Windows?
Signup and view all the answers
What does the 'ls -l' command help determine on Linux systems? (Select all that apply)
What does the 'ls -l' command help determine on Linux systems? (Select all that apply)
Signup and view all the answers
What is the function of the 'cls' command?
What is the function of the 'cls' command?
Signup and view all the answers
What is the topmost directory in a Linux file system?
What is the topmost directory in a Linux file system?
Signup and view all the answers
What is the purpose of the 'tree' command?
What is the purpose of the 'tree' command?
Signup and view all the answers
What is the extension of a word document file?
What is the extension of a word document file?
Signup and view all the answers
What is the purpose of a folder?
What is the purpose of a folder?
Signup and view all the answers
What command is used to print information about the current logged in user?
What command is used to print information about the current logged in user?
Signup and view all the answers
What determines the type of a file?
What determines the type of a file?
Signup and view all the answers
In a Linux file system, what takes the place of drive letters like C: or D:
In a Linux file system, what takes the place of drive letters like C: or D:
Signup and view all the answers
What is the main advantage of using a cluster of computers in the matrix server?
What is the main advantage of using a cluster of computers in the matrix server?
Signup and view all the answers
What is required to connect to the matrix Linux account from off-campus?
What is required to connect to the matrix Linux account from off-campus?
Signup and view all the answers
What protocol is used to connect to Matrix securely from any Seneca lab workstation or personal computer?
What protocol is used to connect to Matrix securely from any Seneca lab workstation or personal computer?
Signup and view all the answers
What is the purpose of using a current working directory in a file system?
What is the purpose of using a current working directory in a file system?
Signup and view all the answers
What type of path is used to specify a file or folder location relative to the current working directory?
What type of path is used to specify a file or folder location relative to the current working directory?
Signup and view all the answers
What is the difference between an absolute path and a relative path?
What is the difference between an absolute path and a relative path?
Signup and view all the answers
What is the purpose of navigating through a file system using the command line interface?
What is the purpose of navigating through a file system using the command line interface?
Signup and view all the answers
What is the benefit of using the ssh protocol to connect to Matrix?
What is the benefit of using the ssh protocol to connect to Matrix?
Signup and view all the answers
What does the command cd do?
What does the command cd do?
Signup and view all the answers
What is the purpose of the ls command in Linux?
What is the purpose of the ls command in Linux?
Signup and view all the answers
What type of file is indicated by the character 'd' in the output of the ls -l command?
What type of file is indicated by the character 'd' in the output of the ls -l command?
Signup and view all the answers
What is the equivalent of the ls command in Windows?
What is the equivalent of the ls command in Windows?
Signup and view all the answers
What type of path is used to specify the location of a directory or file relative to the current working directory?
What type of path is used to specify the location of a directory or file relative to the current working directory?
Signup and view all the answers
What is the purpose of the cd command with an absolute path?
What is the purpose of the cd command with an absolute path?
Signup and view all the answers
What type of file is indicated by the character '-' in the output of the ls -l command?
What type of file is indicated by the character '-' in the output of the ls -l command?
Signup and view all the answers
What is the purpose of using the cd command with a relative path?
What is the purpose of using the cd command with a relative path?
Signup and view all the answers
Study Notes
Connection to Matrix
- Seneca students have access to a Matrix server, a cluster of computers running CentOS (a version of Linux), which can be accessed remotely using VPN or SSH.
- To connect to Matrix, students need to download and install a VPN client or use SSH (secure shell) protocol.
- Connection to Matrix is required for practicing Linux commands, performing Linux labs, and doing quizzes/tests.
File Systems
- A file system is a method of organizing and retrieving files efficiently from a storage medium (e.g., hard disk).
- Both Linux and Windows are hierarchical file systems, where files are organized in folders and subfolders.
- In Linux, the topmost directory is the root (/), and there are no drive letters like C: or D.
- In Windows, the File System hierarchy starts from drives: C:, D:, etc.
Files and Folders (Directories)
- Folders are containers that can have files and other folders (subfolders).
- Files are used to save user data, and can be of many different types (e.g., Word documents, XL files, PPT files).
- File types are identified by their extensions (e.g., .docx, .exe, .txt).
- A specific program or application is required to open each file type.
File Names
- Unix/Linux is case sensitive, whereas Windows is not case sensitive for file names.
- Adopt a consistent file naming scheme, and avoid non-alphanumeric characters and spaces in file names.
Linux Hierarchical File System
- The standard Linux distribution follows a specific directory structure, with multiple top-level directories (e.g., /bin, /home, /usr, /etc, /var, /tmp, /dev, /opt).
Current Working Directory
- The current working directory is the folder/directory where you are currently working.
- The cd command is used to change the current working directory.
Paths
- A path specifies a unique location of a file or directory in the file system.
- There are three ways of specifying pathnames: absolute, relative, and relative to home.
- Examples of paths: /home/cory, C:\Users\Natali, /home/jono/work.
Changing the Current Working Directory
- The cd command is used to change the current working directory.
- You can use any type of paths (absolute, relative, or relative to home) with the cd command.
Listing the Contents of a Directory
- In Linux, the ls command is used to display a list of files and subdirectories in the current directory or any other directory.
- In Windows, the dir command is used to list the contents of a directory.
- Options can be used with these commands to customize the output.
File Systems and Matrix
- Connection to matrix: Seneca students have access to both Windows and Linux OS, with Linux available on the matrix server.
- Matrix server consists of several computers running CentOS, a version of Linux, connected together to form a cluster.
- All registered students in this course have access to an account on Matrix for practicing Linux commands, performing Linux labs, and doing quizzes/tests.
Connecting to Matrix
- As of September 2020, students must connect to the Seneca Global Portal VPN to access their matrix Linux account when off-campus.
- Download and install the VPN client from https://students.senecacollege.ca/spaces/186/it-services/wiki/view/1025/student-vpn.
- Connect to matrix from any Seneca lab workstation or personal computer using ssh (secure shell) protocol.
- Commands:
who
prints information about the current logged-in user,whoami
prints the name of the current user,cls
orclear
clears the terminal screen, andtree
shows the folder hierarchy in a tree format.
File System
- A file system is a method of organizing and retrieving files efficiently from a storage medium, such as a hard disk.
- Both Linux and Windows are hierarchical file systems, with files organized in folders and subfolders.
- In Linux, the topmost directory is the root (/), and all files and directories appear under it.
- There are no drive letters like C, D, etc. in Linux.
Files and Folders (Directories)
- Virtually everything in a modern computer system is a file or a folder.
- Folders are containers that can have files and other folders (called sub-folders).
- Examples of folders: Home folder, Desktop folder, Root Folder.
- Files are used to save user data, and can be of many different types, such as Word documents, XL files, PPT files, etc.
- File types are identified by their extensions (3 or 4 last characters after a dot).
Navigation and Listing
-
cd
command changes the directory to the parent of the current directory. -
cd /home/ops102
changes the directory to the location specified by an absolute path. -
ls
command lists the contents of a directory in Linux, anddir
is the parallel command in Windows. -
ls -l
command determines the type of file and looks at the first character in the detailed listing.
File Types in Linux
-
ls -l
command displays file types:-
-
indicates a regular file. -
b
orc
indicates a device file. -
d
indicates a directory. -
l
indicates a symbolic link. -
p
indicates a pipe, used to communicate between processes on the same server. -
s
indicates a socket, used to communicate between processes on the same or different servers.
-
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Learn about the basics of operating systems, including file systems, commands, and directories. Explore the connection to matrix and understand how to navigate through different operating systems.