Podcast
Questions and Answers
What should you set to prevent disconnections when using the Windows version of PuTTY?
What should you set to prevent disconnections when using the Windows version of PuTTY?
What Unix command line deletes a directory and everything inside it?
What Unix command line deletes a directory and everything inside it?
Which CTRL key will interrupt the command 'sleep 60' and take you back to the command prompt?
Which CTRL key will interrupt the command 'sleep 60' and take you back to the command prompt?
If you type the command 'touch foo ; mkdir bar ; mv foo mt/bar', what is true about the directory mt?
If you type the command 'touch foo ; mkdir bar ; mv foo mt/bar', what is true about the directory mt?
Signup and view all the answers
What happens after the command 'mv cow/dog cow/././cat'?
What happens after the command 'mv cow/dog cow/././cat'?
Signup and view all the answers
If my current directory is /usr, which of these pathnames is equivalent to the pathname /usr/x/y/z?
If my current directory is /usr, which of these pathnames is equivalent to the pathname /usr/x/y/z?
Signup and view all the answers
What is the function of the 'apropos' command in Unix?
What is the function of the 'apropos' command in Unix?
Signup and view all the answers
What is the function of the 'grep' command in Unix?
What is the function of the 'grep' command in Unix?
Signup and view all the answers
How many arguments and options are there to the command: ls -lid /p
How many arguments and options are there to the command: ls -lid /p
Signup and view all the answers
If I am in directory /home/me and mt is an empty sub-directory, what is true after this command line: touch foo ; mkdir bar ; mv foo bar/mt
If I am in directory /home/me and mt is an empty sub-directory, what is true after this command line: touch foo ; mkdir bar ; mv foo bar/mt
Signup and view all the answers
What is true after the command line touch ./mt/fil ; mv mt/./fil mt/../../me/./y is executed?
What is true after the command line touch ./mt/fil ; mv mt/./fil mt/../../me/./y is executed?
Signup and view all the answers
Which of these is the correct CLS name to use when on-campus (or via VPN)?
Which of these is the correct CLS name to use when on-campus (or via VPN)?
Signup and view all the answers
Simplify this pathname: /home/me/../you/../../etc/../home/me/../you/../me/../..
Simplify this pathname: /home/me/../you/../../etc/../home/me/../you/../me/../..
Signup and view all the answers
What command would you use to find the string tony in the file /etc/passwd?
What command would you use to find the string tony in the file /etc/passwd?
Signup and view all the answers
If my current directory is /lib, which of these pathnames is equivalent to the pathname /lib/x/y?
If my current directory is /lib, which of these pathnames is equivalent to the pathname /lib/x/y?
Signup and view all the answers
If my current directory is /etc, which of these pathnames is equivalent to the file name /etc/passwd?
If my current directory is /etc, which of these pathnames is equivalent to the file name /etc/passwd?
Signup and view all the answers
What would you see if you typed this command: cat /foo
What would you see if you typed this command: cat /foo
Signup and view all the answers
What happens after the command mv foo/me foo/bar is executed?
What happens after the command mv foo/me foo/bar is executed?
Signup and view all the answers
If /bin/bash is a file name, which pathname almost always leads to the same file?
If /bin/bash is a file name, which pathname almost always leads to the same file?
Signup and view all the answers
To change your own account password, use this exact command line:
To change your own account password, use this exact command line:
Signup and view all the answers
What happens when you try to change to the parent directory of ROOT, e.g. cd / ; cd..
What happens when you try to change to the parent directory of ROOT, e.g. cd / ; cd..
Signup and view all the answers
Study Notes
Linux File System and Commands
- The
touch
command creates an empty file. - The
mv
command moves or renames a file or directory. - The
mkdir
command creates a new directory. - The
rm
command deletes a file or directory. - The
cp
command copies a file or directory. - The
grep
command searches for a pattern in a file or files. - The
find
command searches for a file or files based on various criteria. - The
passwd
command changes a user's login password.
Pathnames and Directories
- A pathname is a sequence of directory names separated by slashes.
- The
.
refers to the current working directory. - The
..
refers to the parent directory. - The
~
refers to the user's home directory. - The
/
at the beginning of a pathname refers to the root directory. - A directory can be referred to by its absolute pathname or its relative pathname.
Changing Directories
- The
cd
command changes the current working directory. - The
cd
command with no arguments changes to the user's home directory. - The
cd /
command changes to the root directory. - The
cd ..
command changes to the parent directory.
File System Hierarchy
- The root directory is the top-most directory in the file system hierarchy.
- The
/home
directory contains user home directories. - The
/etc
directory contains system configuration files. - The
/bin
directory contains executable files. - The
/lib
directory contains library files.
Command Line Options
- Square brackets
[]
in a command synopsis indicate optional arguments. - The
apo
command displays a list of utilities available for compiling programs. - The
man
command displays the manual for a command or function.
Using PuTTY
- To prevent disconnections when using PuTTY, set the seconds between keepalives to 55.
- The
sleep
command pauses execution for a specified amount of time. - The
^C
key interrupts a command and returns to the command prompt.
Miscellaneous
- The
_synopsis
section of a manual page describes the command syntax. - The
CL
command line interface is used to interact with the operating system. - The
HOME
directory is the user's home directory.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of Linux file system and commands, including creating files and directories, moving and copying files, searching for patterns, and more.