Unix 1 Flashcards

1
Q

pwd

A

Will show you current directory

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

manage memory, I/O devices, allocates the time between user and process, inter-process communication, sets process priority

A

Kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • information about users logged on to system
A

who, w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • displays calendar for specified month of

specified year

A

cal 3 1995

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

is the most popular Unix shell, and is very similar to the

Bash shell

A

Korn shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  • displays calendar for specified year
A

cal 1995

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

LINUX was created by

A

Linus Torvalds

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

Linux was created by Linus Torvalds in the

A

1990’s, released to the

Internet in 1994, mostly using GNU C compiler

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

creates a new file, or updates stats (eg. timestamp) on an

existing file

A

 touch

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

to create directories

A

mkdir

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

to create a directory & any parent directories not

already existing

A

mkdir -p

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

to delete empty directories, eg. ___ directorylist

A

rmdir

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

existing-file new-file to rename or move files & directories

A

mv

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

source-file destination-file - to copy files (careful, overwrites destination with no warning)

A

cp

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

to copy directories including files and subdirectories

A

cp -r

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

to delete files, eg. rm file-list

A

rm

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

to delete directories including files and subdirectories

A

rm -r

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

to delete directories including files and

subdirectories, with prompt to confirm removal

A

rm -ir

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

display contents of file

A

cat

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

displays file contents one page at a time

o <space> - will go to next screenful of information</space>

A

more or less -
b - will go to previous screenful of information

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

the ??? is a program that sits on the as an interface between users and kernel.
it is a command interpreter and also programming capability of its own.
has many types

A

shell

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

information about your session

A

who am i, whoami

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

is used to change current directory

A

cd

cd directory name

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

Unix is an

A

operating system (OS)

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

File Types as indicated by the first character in ls -l output:

A

o - indicates an ordinary file

o d indicates a directory

o l indicates a symbolic link

o b indicates a block device file, such as for a dvd reader

o c indicates a character device file, such as for a keyboard

o p indicates a pipe, used to communicate between processes on

the same server

o s indicates a socket, used to communicate between processes

on the same or different servers

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

this directories is used by some programs for temporary files

A

/tmp

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

is the heart of the operating system

A

Kernel

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

Unix file system is hierarchical

A

(tree, directory within directory)

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

GNU meaning ??

A

(Gnu’s not Unix)

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

contain standard utility programs

A

/bin and /usr/bin

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

some UNIX systems allow up to ??? characters in a filename

A

255 character

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

allocate resources and schedule tasks

resources include CPU, memory, disk, tape, printers, terminals,

modems, etc.

A

operating system

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

ls flag that give long form gives more information about files

A

ls -l -

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

gives information about the directory itself, not
contained files

A

ls -d

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

Unix is develop for

A

mini computer as a time-sharing computer

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

these options can be mixed and matched, eg. ls -ld

A

these options can be mixed and matched, eg. ls -ld

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

this file type indicates a socket, used to communicate between processes
on the same or different servers

A

s

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

to log out

A

control-d

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

standard directories & files

A

o /home typically contains the home directories of all users

o /bin and /usr/bin contain standard utility programs

o /sbin and /usr/sbin contain utilities for system

administration

o /etc contains admin & configuration files, such

as /etc/passwd

o /var contains files that vary as the system is running, such as

temp, log, spool, and mailbox files

o /dev contains files representing peripheral devices (device

drivers)

o /tmp is used by some programs for temporary files

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

Linux treats everything as a file including hardware devices

arranged as directory hierarchy

A

file system

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

list information about files and directories

A

ls

ls -a = all files including hidden files

42
Q

interrupt a process usually?

A

control-c

43
Q

this file type indicates a pipe, used to communicate between processes on

the same server

A

p

44
Q

file type indicates a block device file, such as for a dvd reader

A

b

45
Q

UNIX was the predecessor of

A

LINUX

46
Q

contains admin & configuration files, such

as /etc/passwd

A

/etc

47
Q

this file type indicates a symbolic link

A

l

48
Q

what is Linux

A

a fully networked 32/64 bit unix like operating system

49
Q

give 4 types of shell

A

Bourne Shell (sh) ( first shell by Stephen bourne)

C shell (sh)

Korn shell (ksh)

Bourne again Shell (bash)

50
Q
  • displays a calendar of the current month
A

cal

51
Q

contains files that vary as the system is running, such as

temp, log, spool, and mailbox files

A

/var

52
Q

hidden filenames begin with a , ls won’t list them, but ls -

a will

A

period
ls won’t list them, but ls -

a will

53
Q

gives date and time

A

date

54
Q

ancestor of all files and directories on system

 directories “contain” files and/or other directories

A

root directory is /
directories actually only contain filenames and pointers to inodes

(information about the files)

55
Q

the top level directory is known as

A

root (/)

56
Q

this file type indicates an ordinary file

A

-

57
Q

develop where and when?

A

AT&T bell 1969

58
Q

this file type indicates a character device file, such as for a keyboard

A

c

59
Q

unix was develop about __ years

A

40 years

60
Q

which shell is the most popular

A

Linux shell

61
Q

what is the use of these symbols

>

> >

A

> = overwrite

> > = append

62
Q

gives info about the contents of the file

A

file ‘file name’’

63
Q

to find files matching specified characteristics

A

find

64
Q

lists

pathname of any filenames beginning with “file”, from the current

directory and any subdirectories

A

find . -name “file*”

65
Q

displays differences between 2 files

o -y option gives a side-by-side comparison

A

diff “ file1 file2 “

66
Q

text or $variable

A

echo

67
Q

lists pathname that would be used to access

this utility

A

which utility

68
Q

symbol of piping operator

A

|

69
Q

. (dot) what does it represent

A

represents the current working directory

70
Q

.. (dot dot) represent??

A

represents its parent

71
Q

-
File Types

A

indicates an ordinary file

72
Q

d
File Types

A

indicates a directory

73
Q

l
File Types

A

indicates a symbolic link

74
Q

indicates a block device file, such as for a dvd reader

A

b
File Types

75
Q

indicates a character device file, such as for a keyboard

A

c
File Types

76
Q

command that gives info about the contents of the file

A

file

77
Q

command to find files matching specified characteristics

A

find

78
Q

pathname of any filenames beginning with “file”, from the current
directory and any subdirectories

A

find . -name “file*”

79
Q

pathname of any files larger than 50 kb, from the current directory
and any subdirectories

A

find . -size +50k

80
Q

files modified less than 5 minutes ago

A

find . -mmin -5 - lists

81
Q

command - online manual (or help) for command, uses more to
display information

A

man

82
Q

searches through man sections for keyword, displays one-line
summary of each related command

A

 man -k keyword - eg. man -k calendar

83
Q

displays differences between 2 files
-y option gives a side-by-side comparison

A

diff file1 file2

84
Q

absolute pathname starts with??

A

/ , representing the root and continue
with the directory structure to the destination filename or directory name

85
Q

relative pathnames do not start with

A

/, and are relative to your current
(or working) directory

86
Q

relative-to-home pathnames are actually absolute, but ???????
represent the home directory

A

use ~ to

~ replaced by $HOME, eg. ~/pathname
~user replaced by home directory of user,
eg. ~user/pathname

87
Q

also called ambiguous file references, metacharacters, wild card
characters, and filename generation characters
 used to find filenames that match a pattern

A

Filename Expansion

88
Q
  • display last 16 commands
A

fc -l

89
Q

display all stored commands

A

history

90
Q

re-execute command number

A

!num

91
Q

re-execute last command beginning with string “xxx”

A

!xxx

92
Q

Ctrl-a

A

 go to the beginning of the line

93
Q

Ctrl-e

A

 go to the end of the line

94
Q

user-created variable names must begin with a letter
o eg. city=Toronto (no spaces around = )

A

 ==> city=Toronto

 ==> echo “My city is $city”
 My city is Toronto

95
Q

will use the output of a command as a string (note the back
quotes, NOT single quotes)

A

cmd

96
Q
  • display ascii characters in a file, useful
    for non-ascii files such as executables
A

 strings filename

97
Q

octal dump, displays contents of a file in various formats

A

od filename

98
Q
  • info about a specific user on system - looked up in
    /etc/passwd file
A

finger user

99
Q
  • character by character conversation with another
    user
A

 talk user

100
Q

line by line conversation with another user

A

 write user

101
Q
A