WorksheetsC3 W2-3
Total questions: 14
Worksheet time: 11mins
In Bash, which of the following commands can you use to view the contents of a document. Check all that apply.
open
cat
less
Dog
In a Linux machine, you have the following files:
apple.txt banana.jpg chocolate.txt orange.txt
What command can you use to search for the word "fruit" in the text files in the above directory? Check all that apply.
grep fruit apple.txt chocolate.txt orange.txt
grep fruit *.txt
find fruit apple.txt chocolate.txt
find fruit apple.txt chocolate.txt orange.txt
In a Linux machine, you want to list through a directory called /home/ben/Documents and search for the word "important" in the filenames in that directory. Which of the following commands can you use?
ls /home/ben/Documents | grep important
ls /home/ben/Documents >> grep important
ls /home/ben/Documents < grep important
ls /home/ben/Documents > grep important
In a Linux machine, you have a file named "types_of_fish.txt" and you want to append the word "trout" to the file contents. Which of the following commands can you use?
echo trout < types_of_fish.txt
echo trout > types_of_fish.txt
echo trout >> types_of_fish.txt
echo trout 2> types_of_fish.txt
What are the basic linux file permissions? Check all that apply.
Read
Write
Modify
Execute
You're given the output of an ls -l of a file in Linux.
ls -l books_file
dr-x-wxr-- 1 phelan cool_group 0 Aug 20 11:10 books_file
Answer the following question: What does the first character of output signify
The file owner is a class D user
books_file is a disk device
The file owner has delete permissions
books_file is a directory
Which special permission bit is used to allow a file to be run as the owner of the file?
SetUID
SetGID
Sticky bit
Super bit
Which special permission bit is used to allow a file to be written to by anyone, but only removable by the owner or root?
SetUID
SetGID
Sticky bit
Read
What's the file extension of a debian package?
rpm
.pkg
.dmg
.deb
What's the difference between an EXE file and an MSI file? Check all that apply.
An MSI file is an executable that can give you complete control over how your application should be installed.
An EXE file is an executable that may have an MSI file as one its resources.
MSI files are used by the Windows Installer to control how your application is installed.
When would you want to use an MSI file to guide the installation of a program, as opposed to an EXE?
When you want the Windows Installer to perform bookkeeping and setup for your application, at the cost of following the rules the Installer requires.
When you want complete, custom control over how the application is installed.
When you want to be able to install your application on Linux as well as Windows
Which of the following file extensions are considered archives in Windows? Check all that apply.
.tar
.exe
.zip
.rar
What's the purpose of a DLL in Windows?
To guide the installation of a package via the Windows Installer
To take up space on your hard drive
To share a package of useful code among programs
Most shared libraries in Windows are managed by which of the following?
Dynamic Linked Libraries, or DLLs
Side-by-side assemblies, or SxS
Left-and-right appendages, or LRAs
