CHapter 4 - Managing Files Flashcards

1
Q

Describe commands used to copy, move and rename files in Linux.

A

page 226
The cp command copies files, as in cp first second to create a copy of first called second. The mv command does double duty as a file-moving and file-renaming command. It works much like cp, but mv moves or renames the file rather than copying it.

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

Summarize Linux’s directory-manipulation commands.

A

page 226
The mkdir command creates a new directory and rmdir deletes a directory. You can also use many file-manipulation commands, such as mv and rm (with its -r option) on directories.

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

Explain the difference between hard and symbolic links.

A

page 226
Hard links are duplicate directory entries that both point to the same inode and hence to the same file. Symbolic links are special files that point to another file or directory by name. Hard links must reside on a single filesystem, but symbolic links may point across filesystem.

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

Summarize the common Linux archiving programs.

A

page227
The tar and cpio programs are both file-based archiving tools that create archives of files using ordinary file access commands. The dd program is a file-copy program; however, when it’s fed a partition device file, it copies the entire partition on a very low-level basis, which is useful for creating low-level image backups of Linux or non-Linux filesystems.

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

Explain the differences between compression utilities.

A

page 227
The gzip, bzip2 and xz utilities are compression tools, which reduce a file’s size via compression algorithms. They are often used in conjunction with the tar command. The gzip utility is the oldest compression tool and provides the least compression. The bzip2 utility provides slightly improved file compression. The xz utlity is the newest tool, provides the best compression and is very popular.

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

Describe Linux’s file ownership system.

A

page 227
Every file has an owner and a group, identified by number. File permissions can be assigned independently to the file’s owner, the file’s group and to all users.

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

Explain Linux’s file permissions system.

A

page 227
Linux provides independent read, write and execute permissions for the file’s owner, the file’s group and all other users resulting in nine main permission bits. Special permission bits are also available, enabling you to launch program files with modified account features or alter the rules Linux uses to control who may delete files.

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

Summarize the commands Linux uses to modify permissions.

A

page 227
The chmod command is Linux’s main tool for setting permissions. You can specify permissions using either an octal (base 8) mode or a symbolic notation. The chown and chgrp commands enable you to change the file’s owner and group, respectively. (The chown command can do both but can be run only by root.)

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

Describe the prerequisites of using Linux’s disk quota system.

A

page 227
Linux’s disk quota system requires support in the Linux kernel for the filesystem on which quotas are to be used. You must also run the quotaon command, typically from a startup script, to enable this feature.

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

Explain how quotas are set.

A

page 227
You can edit quotas for an individual user via the edquota command, as in edquota command, as in eduota larry to edit larry’s quotas. This command opens an editor on a text file that describes the user’s quotas. You can change this description, save the file and exit from the editor to change the user’s quoats.

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

Summarize how Linux’s standard directories are structured.

A

page 277
Linux’s directory tree begins with the root (/) directory, which holds mostly other directories. Specific directories may hold specific types of information, such as user files in /home and configuration files in /etc. Some of these directories and their sub-directories may be separate partitions, which helps isolate data in the event of filesystem corruption.

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

Describe the major file-location commands in linux.

A

page 227
The find command locates files by brute force, searching through the directory tree for files that match the criteria you specify. The locate (or slocate) command searches a database of files in publicly accessible directories. The whereis command searches a handful of important directories and which searches the path. The type command identifies another command as a built-in shell command, a shell alias, or an external command (including the path to that command)

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