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
File Types as indicated by the first character in ls -l output:
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
26
this directories is used by some programs for temporary files
/tmp
27
is the heart of the operating system
Kernel
28
Unix file system is hierarchical
(tree, directory within directory)
29
GNU meaning ??
(Gnu's not Unix)
30
contain standard utility programs
/bin and /usr/bin
31
some UNIX systems allow up to ??? characters in a filename
255 character
32
allocate resources and schedule tasks resources include CPU, memory, disk, tape, printers, terminals, modems, etc.
operating system
33
ls flag that give long form gives more information about files
ls -l -
34
gives information about the directory itself, not contained files
ls -d
35
Unix is develop for
mini computer as a time-sharing computer
36
these options can be mixed and matched, eg. ls -ld
these options can be mixed and matched, eg. ls -ld
37
this file type indicates a socket, used to communicate between processes on the same or different servers
s
38
to log out
control-d
39
standard directories & files
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
40
Linux treats everything as a file including hardware devices arranged as directory hierarchy
file system
41
list information about files and directories
ls ls -a = all files including hidden files
42
interrupt a process usually?
control-c
43
this file type indicates a pipe, used to communicate between processes on the same server
p
44
file type indicates a block device file, such as for a dvd reader
b
45
UNIX was the predecessor of
LINUX
46
contains admin & configuration files, such as /etc/passwd
/etc
47
this file type indicates a symbolic link
l
48
what is Linux
a fully networked 32/64 bit unix like operating system
49
give 4 types of shell
Bourne Shell (sh) ( first shell by Stephen bourne) C shell (sh) Korn shell (ksh) Bourne again Shell (bash)
50
- displays a calendar of the current month
cal
51
contains files that vary as the system is running, such as temp, log, spool, and mailbox files
/var
52
hidden filenames begin with a , ls won't list them, but ls - a will
period ls won't list them, but ls - a will
53
gives date and time
date
54
ancestor of all files and directories on system  directories "contain" files and/or other directories
root directory is / directories actually only contain filenames and pointers to inodes (information about the files)
55
the top level directory is known as
root (/)
56
this file type indicates an ordinary file
-
57
develop where and when?
AT&T bell 1969
58
this file type indicates a character device file, such as for a keyboard
c
59
unix was develop about __ years
40 years
60
which shell is the most popular
Linux shell
61
what is the use of these symbols > >>
> = overwrite >> = append
62
gives info about the contents of the file
file 'file name''
63
to find files matching specified characteristics
find
64
lists pathname of any filenames beginning with "file", from the current directory and any subdirectories
find . -name "file*"
65
displays differences between 2 files o -y option gives a side-by-side comparison
diff " file1 file2 "
66
text or $variable
echo
67
lists pathname that would be used to access this utility
which utility
68
symbol of piping operator
|
69
. (dot) what does it represent
represents the current working directory
70
.. (dot dot) represent??
represents its parent
71
- File Types
indicates an ordinary file
72
d File Types
indicates a directory
73
l File Types
indicates a symbolic link
74
indicates a block device file, such as for a dvd reader
b File Types
75
indicates a character device file, such as for a keyboard
c File Types
76
command that gives info about the contents of the file
file
77
command to find files matching specified characteristics
find
78
pathname of any filenames beginning with "file", from the current directory and any subdirectories
find . -name "file*"
79
pathname of any files larger than 50 kb, from the current directory and any subdirectories
find . -size +50k
80
files modified less than 5 minutes ago
find . -mmin -5 - lists
81
command - online manual (or help) for command, uses more to display information
man
82
searches through man sections for keyword, displays one-line summary of each related command
 man -k keyword - eg. man -k calendar
83
displays differences between 2 files -y option gives a side-by-side comparison
diff file1 file2
84
absolute pathname starts with??
/ , representing the root and continue with the directory structure to the destination filename or directory name
85
relative pathnames do not start with
/, and are relative to your current (or working) directory
86
relative-to-home pathnames are actually absolute, but ??????? represent the home directory
use ~ to ~ replaced by $HOME, eg. ~/pathname ~user replaced by home directory of user, eg. ~user/pathname
87
also called ambiguous file references, metacharacters, wild card characters, and filename generation characters  used to find filenames that match a pattern
Filename Expansion
88
- display last 16 commands
fc -l
89
display all stored commands
history
90
re-execute command number
!num
91
re-execute last command beginning with string "xxx"
!xxx
92
Ctrl-a
 go to the beginning of the line
93
Ctrl-e
 go to the end of the line
94
user-created variable names must begin with a letter o eg. city=Toronto (no spaces around = )
 ==> city=Toronto   ==> echo "My city is $city"  My city is Toronto
95
will use the output of a command as a string (note the back quotes, NOT single quotes)
`cmd`
96
- display ascii characters in a file, useful for non-ascii files such as executables
 strings filename
97
octal dump, displays contents of a file in various formats
od filename
98
- info about a specific user on system - looked up in /etc/passwd file
finger user
99
- character by character conversation with another user
 talk user
100
line by line conversation with another user
 write user
101