Review Questions Flashcards

1
Q

Gary Kildall contributions?

A

Wrote an operating system for the 8080 processor, which was called Control Program for Microcomputer (CP/M)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. What is the difference between copyright and copyleft?
A

Copyleft = open-source.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. When was the first Unix operating system developed?
A

Unix was developed in 1969 on a PDP-7 with 8K of RAM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. When was the first Linux operating system developed?
A

From 1991-present, Linux (Unix based operating system) is
becoming a popular alternative to Windows for many students and
companies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. From where did the word “Unix” come from?

12. From where did the word “Linux” come from?

A

After Bell Labs dropped out of the MULTICS project, one of its researchers, Ken Thompson (February 4, 1943), was looking around for something to do
􏰁 He decided to implement a small version of MULTICS
(using assembly language) on a discarded PDP-7 minicomputer with 8K RAM
􏰂 Succeeded to do so in 1969 (at age 26)
􏰁 His friend, Brian Kernighan (January 1, 1942) (a Canadian CS), jokingly called this new product UNICS (UNiplexed Information and Computing Service)
Later on, the spelling was changed from UNICS to UNIX

  1. based on the name of Linus Torvalds, who created it, and to sound like Unix, since it is a flavor of Unix
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Who developed the first Unix operating system?
A

Ken Thompson and Dennis Ritchie

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. Who developed the first Linux operating system?
A

Linus Torvalds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. Who were the first to develop the first C compiler?
A

Dennis Ritchie

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. Who were the first to re-write the Unix operating system in C?
A

Ken Thompson and Dennis Ritchie

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. The command rmdir c.progs failed. State three possible reasons for this failure.
A

1) has files in it

2) it is inside a directory that does not have write permissions enabled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. Which Unix command would you use to delete a directory called dir1 which contains some files and directories in it?
A

rm -r dir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. List 5 different ways to change the current working directory to your home directory.
A

1) cd
2) cd absolute path
3) cd ~
4) cd $HOME
5) if you are in a folder that is in your home directory cd ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. How many characters can a Unix filename be?
A

255 characters (255 bytes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Which character(s) can’t be used in a Unix filename?
A

forward slash.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

􏰁 Many commands use “ ” to say there are no more options

A

Ex: obelix[5] > rm – -i

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. Explain what the following commands do: (i) rm * (ii) rm -i * (iii) rm -r * (iv) rm rm
A

1) removes any file in the current directory (star wildcard = any repetitions of a character = any file name
2) -i = interactive promo. Star wildcard = all files
3) rm -r * delete all directories in current directory and their contents
4) deletes a file called rm if it exists

17
Q
  1. What is the difference between ls and ls * Unix commands?
A
Nothing. The list commands list whatever argument you give it:
ls adf
\: adf
ls *
adf adf adf
18
Q
  1. How do you remove the hidden files in your current working directory?
A

rm -rf .*

19
Q
  1. Explain what the commands ls .* and ls *. display. Does it make any difference if the -d option is added?
A

ls -d .*

20
Q

echo “The date and time are date “
echo “The date and time are date
echo “The date and time are ‘date’ “
echo “The date and time are “date” “

A

The date and time are data
The date and time are Fri Oct 15.. etc..
The data and time are ‘date’
The date and time are date

21
Q

echo /*

echo*

A

root directory and all its folders / contents

22
Q
  1. When you invoke ls -l foo, the access time of foo changes. True or false? Explain your answer.
A

No

23
Q
  1. Create a file in your home directory and change its permission to 444. Copy this file to another file. Compare the permissions of the two files. Are they the same or not? Explain.
A

444 = r–r–r–
After copying, ls -l copied file reveals:
only “r– — —”

Thus, strips all permissions from G and O?

24
Q
  1. What happens when you execute cat > foo if foo contains data?
A

error because you can’t direct an output into a file that has content, you can only APPEND output into a file that already has content.

25
Q
  1. How do you find out (i) the number of users logged in (ii) the number of directories in your home directory tree?
A

ls -d \/* | wc -w

26
Q
  1. How do you move a Unix job from the foreground to the background?
A

Suspend job, then resume it in the background using the bg command

27
Q

What is the difference between environment variables and local variables?

A
  • affects current shell & programs invoked from the shell
  • affects current shell but not programs invoked from the shell