3377

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 93

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

94 Terms

1

what command to use switch back and forth with files in VI editor

:bp and :bn

New cards
2

what symbol indicates file is empty in vi editor

~

New cards
3

to go to start of a file and to go to bottom of a file use what commands

G and gg

New cards
4

Insert before char which command

i

New cards
5

Insert after char which command

a

New cards
6

Switch from command to input in VI. You have to use what command

a,i,o

New cards
7

Switch from input to command. You have to use what command

Esc

New cards
8

How to move to line 89

:89

New cards
9

what can we do to recover a file

vi -r filename

New cards
10

how to globally replace one word with another

:%s/.../.../g

New cards
11

Steps to copy a test

ma
y'a
p

New cards
12

y'a

New cards
13

p

New cards
14

Steps to move a text

ma
d'a
p

New cards
15

d'a

New cards
16

p

New cards
17

Name the two modes in the vi tutor

command and insert mode

New cards
18

Count the files that you own in all your directories (where your userid is myusername)

ls -lR | grep myusername | wc -l

New cards
19

What UNIX command is used to update the modification time of a file and/or change the file's access?

touch

New cards
20

To list the permissions on files, which of the following commands will work?

ls -l

New cards
21

When you use the ln command, which of the following occurs?

a file is created that points to an existing file

New cards
22

(T/F)The command "grep -i hello" prints all the lines in file, not containing the string "hello".

false

New cards
23

Which of the following is not a UNIX file type?

New cards
24
New cards
25

plain file

New cards
26

special file

New cards
27

batch file

New cards
28

Which of the following is not a UNIX file type?

plain file
special file
batch file
directory file

batch file

New cards
29

How do you rename file "new" to be "old"?

mv new old

New cards
30

To delete a file called mynotes.txt, which command do you use?

rm -i mynotes.txt

New cards
31

In Unix, if you wanted to allow a user to list the contents of a directory, you would give the directory what permission, at least?

read

New cards
32

What is the generic syntax for all UNIX commands?

command name, followed by options, followed by arguments

New cards
33

Which command is used to create the directory "abc" in the previous (parent) directory?

mkdir ../abc

New cards
34

Make a copy of file "upper" in the directory two levels up.

cp upper ../..

New cards
35

Consider a file abc which can be "read, write, execute" only by the owner. After the following command: "chmod g+x abc", the result will be is equivalent to the result of command:

chmod 710 abc.

New cards
36

(T/F)The command "grep hello file" prints all lines in "file" that contains hello.

true

New cards
37

What is a shell in UNIX?

a program through which users can issue commands to UNIX

New cards
38

How do you print the first 15 lines of all files ending by ".txt"?

head -15 *.txt

New cards
39

To create a new file "new.txt" that is a concatenation of "file1.txt" and "file2.txt" is done by which command?

cat file1.txt file2.txt > new.txt

New cards
40

To match all your .files (that is, any hidden files begins with a period).

ls .*

New cards
41

Use this as a last resort to destroy any jobs or programs that you suspended and are unable to restart

kill

New cards
42

This displays information about programs that are currently running

New cards
43

Displays process status

ps

New cards
44

Sorts and/or merges files

sort

New cards
45

This displays the beginning of a file

head

New cards
46

This joins lines from two files based on a common field

join

New cards
47

With this option of chmod command,

New cards
48

Owner can read, write, and execute the file; group and other can execute the file.

0711

New cards
49

Displays the last part (tail) of a file

tail

New cards
50

outputs content of a text file, read through brief files, concatenate files together

cat

New cards
51

This displays text files, one screen at a time

less

New cards
52

This reports file system disk usage (i.e., the amount of space taken up on mounted file systems).

df

New cards
53

This searches for a pattern in files

grep

New cards
54

Owner can read, and write the file; group can read the file, and other cannot access the file.

0640

New cards
55

To run a program or command in background, use this symbol at the end of the command line.

New cards
56

Ampersand ("&")

New cards
57

Pipe ("|")

New cards
58

Percent ("%")

New cards
59

Dollar ("$")

New cards
60

To run a program or command in background, use this symbol at the end of the command line.
Ampersand ("&")
Pipe ("|")
Percent ("%")
Dollar ("$")
At-sign ("@")

Ampersand ("&")

New cards
61

This terminates a process by PID

New cards
62

kill

New cards
63

terminate

New cards
64

pskill

New cards
65

stop

New cards
66

This terminates a process by PID


kill
terminate
pskill
stop
procterm

kill

New cards
67

Which one of the following methods is NOT correct for two processes to communicate each other?

pipe

New cards
68

What is the acronym for the unique id given to each running process

PID

New cards
69

All directories are in a _________ structure

hierarchical

New cards
70

What is the symbol for root directory

/

New cards
71

/bin

Holds the files needed to bring the system up and run it when it first comes up in single-user/recovery mode.

New cards
72

/dev

Device files Contains all the files that represent peripheral devices, such as disk drives, terminals, and printers.

New cards
73

/boot

Static files of the boot loader Contains all the files needed to boot the system.

New cards
74

/opt

Add-on (optional) software packages

New cards
75

/sbin

Essential system binaries and used only by superuser

New cards
76

Special user for administrator is called

superuser

New cards
77

change directory

cd

New cards
78

pwd

show current position/working direcotry

New cards
79

what command can we use to navigate one up in the directory hierarchy?

cd ..

New cards
80

List all files/folders that end in ".bashrc"

ls -l .bashrc

New cards
81

hidden filenames start with

.

New cards
82

switch user command

su

New cards
83

change password

passwd

New cards
84

list all

ls -a

New cards
85

detailed list of all files and directories

ls -la

New cards
86

The command searches for the string "Desk" in the redirect.txt file and for each line that contains "Desk", it prints the line number.

grep -n Desk redirect.txt

New cards
87

It shows the last 10 lines of a file and filters them to display only lines containing the word "Desk."

New cards
88

It shows the last 10 lines of a file and filters them to display only lines containing the word "Desk."
What command is this?

tail redirect.txt | grep Desk

New cards
89

identify the largest file in the directory

ls -la/bin | sort -nk5 | tail -1

New cards
90

lists all running processes and then filters the list to show only the processes that have "Java" in their command or arguments

ps -ef | grep Java

New cards
91

Does it compile, link or both : g++ -o textr *.cpp

Both compilation and linking.

New cards
92

Does it compile, link or both : g++ -Wall -g -c main.cpp

Compilation only.

New cards
93

Does it compile, link or both : g++ -o myProg -L/usr/class/cs193/danLib -lDansFns *.o

Linking only.

New cards
94

Does it compile, link or both : g++ -I/usr/class/cs193/inc main.cpp src1.cpp src2.cpp

Both compilation and linking.

New cards
robot