Unix/Linux Commands and Operating Systems Basics
Test your knowledge of Unix/Linux command-line operations, shell scripting basics, and fundamental operating systems concepts including file permissions, process states, and I/O operations.
Questions
_____________ is the command that writes the last 10 lines of a file to the screen.
- head
- last
- tail
- cat
Which command is used to change your password?
- pwd
- Passwd
- password
- user
Which command will display a calendar?
- ls
- cat
- grep
- cal
Which command can be used to display the contents of a file on the screen?
- dir
- cp
- cal
- cat
Which command would you use to create a sub-directory in your home directory?
- dir
- rmdir
- cd
- mkdir
_____________ is the command that writes the first 10 lines of a file to the screen.
- whereami
- head
- dir
- ls
The ________ command will display the absolute pathname for the directory that you are wokring in.
- pwd
- cwd
- dir
- ls
wc command will report mispelled words.
- True
- False
Which command allows you to determine if a host is connected to the Internet?
- ls
- dir
- ping
- host
The file assign4.html has permissions set as rwxrwxrwx
- The file is really a directory and was named incorrectly.
- It is impossible for an html file to have permissions set that way.
- Everyone can read, write, and execute the file.
- The file can not be viewed on the WWW.
When a thread blocks on I/O, which of the following are true?
- The thread enters the ready state
- The thread enters the dead state
- No other thread may perform I/O
- The thread enters the waiting state
What is the command used for redirecting the standard error (stderr) to a file?
- <
- >>
- 2>
- <2
What is the result of doing the following? date >> file
- The date output is redirected to the file.
- The date output is redirected and appended to the end of the file.
- The date output is redirected and appended to the beginning of the file.
- None of the above
Which of the following will return the exit code of the last executed command?
- $%
- $#
- $?
- $!
What is the command used for changing the scope of a shell variable to a global variable?
- global
- shell
- export
- None of the above