NDOS515_Session_2 Flashcards

1
Q

“Desktop”…?

A

Shows up on your GUI desktop

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

“Documents”…?

A

for…documents.

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

“Bin”…?

A

holds “binaries” and executable scripts

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

“public_html”…?

A

(sometimes) has your Web page(s)

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

“pwd”…?

A

tells where you are

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

“cd”…?

A

to get to a new directory (folder)

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

”~”…?

A

refers to your home

  • cd ~
  • cd ~/music
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Leading slash (or ~) means …?

A

Start at top.

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

Absence of slash means…?

A

From here.

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

Linux Standard Directories:

/bin…?

A

Important executables.

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

Linux Standard Directories:

/etc…?

A

System configuration.

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

Linux Standard Directories:

/home…?

A

Users homes

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

Linux Standard Directories:

/tmp…?

A

Temporary Files.

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

Linux Standard Directories:

/user/bin…?

A

More executables.

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

Redirection:

The output of any command can be captured into a file…?

A

ls > listing.txt

note: “.txt” isn’t necessary and is omitted by experienced Unix users

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

Adding to a file…?

A

ls/bin&raquo_space; listing.txt

17
Q

Viewing files:

Short files can be viewed with…?

A

cat.

cat listing.txt

18
Q

Viewing files:

For longer ones, use…?

A

Less
(less bigfile)
(type space to see more, q to quit, h for help)

19
Q

Viewing files:

Use file to find out what something is…?

A

file /etc/passwd

20
Q

Copy, rename/move, delete…?

A
  • cp coolstuff coolstuff.bak
  • mv coolstuff.bak backup
  • mv backup my-backups/coolstuff.bak
  • rm my-backups/coolstuff.bak
21
Q

Unix (and Linux) is design on the assumption that you don’t like…?

A

Chatty computers.

22
Q

Success in Linux is generally indicated by…?

A

Silence:
(rm backup
rm backup2
rm: cannot remove ‘backup2’: No such file or directory)

23
Q

Directory Management:

For historical reasons, directories are handled differently:

A
  • mkdir backups
  • rmdir obsolete
  • cp -r public_html backups/web-backup
  • rm -r backups
    (WARNING rm -r is extremely dangerous. Never type Enter until you’ve triple-checked what you typed!)
24
Q

Globbing:

It’s a pain to type lots of file names, so you can…?

A
abbreviate.
- ls a*
- less *.txt (omits files starting with dot... why)
- ls .??*
More choices, but these are common ones.
25
Q

What is an editor…?

A
  • Shows you exactly what’s in the file
  • Give you control over file contents
  • Can be hard to learn
26
Q

What’s a word processor…?

A
  • Usually easy for beginners to get started
  • Puts priority on formatting and layout
  • Shows you what printed page will look like
  • File contents are very different from what you see.
27
Q

Simple Editors on Linux:

Nano…?

A
  • Command-line
  • Fairly easy to start with
  • Word-wraps by default, which can be problematic
28
Q

Simple Editors on Linux:

gedit…?

A
  • GUI

- Easy to get going

29
Q

Powerful Linux Editors:

vi…?

A
  • Command line
  • Hard to learn
  • Modal
  • Popular with many (because they learned t first?)
30
Q

Powerful Linux Editors:

emacs…?

A
  • Command line or GUI
  • Hard to learn
  • Amazingly powerful and flexible (too much?)
  • Lets you click, type, use arrow keys and mouse (non-modal)
31
Q

Best way to choose an editor…?

A
  1. Decide how much work you’re willing to put out.
  2. Try at least two
    • Give enough time to actually learn them well
    • Choose significantly different ones.
  3. Pick based on what fits your preference and needs.
    • DON’T choose one just because your friends use it.